mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Convert to enum class
This commit is contained in:
parent
4b372b438e
commit
8aa36ee31e
@ -333,7 +333,7 @@ bool RiaApplication::openFile( const QString& fileName )
|
|||||||
}
|
}
|
||||||
else if ( fileType & RiaDefines::ANY_ECLIPSE_FILE )
|
else if ( fileType & RiaDefines::ANY_ECLIPSE_FILE )
|
||||||
{
|
{
|
||||||
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ fileName }, true );
|
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{fileName}, true );
|
||||||
lastUsedDialogTag = RiaDefines::defaultDirectoryLabel( fileType );
|
lastUsedDialogTag = RiaDefines::defaultDirectoryLabel( fileType );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,7 +567,7 @@ bool RiaApplication::loadProject( const QString& projectFileName,
|
|||||||
// If load action is specified to recalculate statistics, do it now.
|
// If load action is specified to recalculate statistics, do it now.
|
||||||
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will
|
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will
|
||||||
// be clamped
|
// be clamped
|
||||||
if ( loadAction & PLA_CALCULATE_STATISTICS )
|
if ( loadAction & int( ProjectLoadAction::PLA_CALCULATE_STATISTICS ) )
|
||||||
{
|
{
|
||||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
|
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
|
||||||
{
|
{
|
||||||
@ -696,7 +696,7 @@ bool RiaApplication::loadProject( const QString& projectFileName,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RiaApplication::loadProject( const QString& projectFileName )
|
bool RiaApplication::loadProject( const QString& projectFileName )
|
||||||
{
|
{
|
||||||
return loadProject( projectFileName, PLA_NONE, nullptr );
|
return loadProject( projectFileName, ProjectLoadAction::PLA_NONE, nullptr );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1824,7 +1824,7 @@ bool RiaApplication::generateCode( const QString& fileName, QString* errMsg )
|
|||||||
|
|
||||||
std::vector<std::shared_ptr<const caf::PdmObject>> commandObjects;
|
std::vector<std::shared_ptr<const caf::PdmObject>> commandObjects;
|
||||||
|
|
||||||
QStringList excludedClassNames{ "TestCommand1", "TC2" }; // See RifCommandCore-Text.cpp
|
QStringList excludedClassNames{"TestCommand1", "TC2"}; // See RifCommandCore-Text.cpp
|
||||||
|
|
||||||
auto allObjects = caf::PdmMarkdownBuilder::createAllObjects( caf::PdmDefaultObjectFactory::instance() );
|
auto allObjects = caf::PdmMarkdownBuilder::createAllObjects( caf::PdmDefaultObjectFactory::instance() );
|
||||||
for ( auto classObject : allObjects )
|
for ( auto classObject : allObjects )
|
||||||
|
@ -87,13 +87,13 @@ class ProgramOptions;
|
|||||||
class RiaApplication
|
class RiaApplication
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum ProjectLoadAction
|
enum class ProjectLoadAction
|
||||||
{
|
{
|
||||||
PLA_NONE = 0,
|
PLA_NONE = 0,
|
||||||
PLA_CALCULATE_STATISTICS = 1
|
PLA_CALCULATE_STATISTICS = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ApplicationStatus
|
enum class ApplicationStatus
|
||||||
{
|
{
|
||||||
KEEP_GOING = 0,
|
KEEP_GOING = 0,
|
||||||
EXIT_COMPLETED,
|
EXIT_COMPLETED,
|
||||||
|
@ -120,14 +120,14 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
if ( cvf::Option o = progOpt->option( "ignoreArgs" ) )
|
if ( cvf::Option o = progOpt->option( "ignoreArgs" ) )
|
||||||
{
|
{
|
||||||
return KEEP_GOING;
|
return ApplicationStatus::KEEP_GOING;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( progOpt->option( "help" ) || progOpt->option( "?" ) )
|
if ( progOpt->option( "help" ) || progOpt->option( "?" ) )
|
||||||
{
|
{
|
||||||
this->showFormattedTextInMessageBoxOrConsole( "\nThe current command line options in ResInsight are:\n" +
|
this->showFormattedTextInMessageBoxOrConsole( "\nThe current command line options in ResInsight are:\n" +
|
||||||
this->commandLineParameterHelp() );
|
this->commandLineParameterHelp() );
|
||||||
return RiaApplication::EXIT_COMPLETED;
|
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Code generation
|
// Code generation
|
||||||
@ -141,10 +141,10 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
if ( !RiaApplication::generateCode( outputFile, &errMsg ) )
|
if ( !RiaApplication::generateCode( outputFile, &errMsg ) )
|
||||||
{
|
{
|
||||||
RiaLogging::error( QString( "Error: %1" ).arg( errMsg ) );
|
RiaLogging::error( QString( "Error: %1" ).arg( errMsg ) );
|
||||||
return RiaApplication::EXIT_WITH_ERROR;
|
return RiaApplication::ApplicationStatus::EXIT_WITH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RiaApplication::EXIT_COMPLETED;
|
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unit testing
|
// Unit testing
|
||||||
@ -154,12 +154,12 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
int testReturnValue = launchUnitTestsWithConsole();
|
int testReturnValue = launchUnitTestsWithConsole();
|
||||||
if ( testReturnValue == 0 )
|
if ( testReturnValue == 0 )
|
||||||
{
|
{
|
||||||
return RiaApplication::EXIT_COMPLETED;
|
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RiaLogging::error( "Error running unit tests" );
|
RiaLogging::error( "Error running unit tests" );
|
||||||
return RiaApplication::EXIT_WITH_ERROR;
|
return RiaApplication::ApplicationStatus::EXIT_WITH_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
if ( !projectFileName.isEmpty() )
|
if ( !projectFileName.isEmpty() )
|
||||||
{
|
{
|
||||||
cvf::ref<RiaProjectModifier> projectModifier;
|
cvf::ref<RiaProjectModifier> projectModifier;
|
||||||
RiaApplication::ProjectLoadAction projectLoadAction = RiaApplication::PLA_NONE;
|
RiaApplication::ProjectLoadAction projectLoadAction = RiaApplication::ProjectLoadAction::PLA_NONE;
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "replaceCase" ) )
|
if ( cvf::Option o = progOpt->option( "replaceCase" ) )
|
||||||
{
|
{
|
||||||
@ -242,7 +242,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectLoadAction = RiaApplication::PLA_CALCULATE_STATISTICS;
|
projectLoadAction = RiaApplication::ProjectLoadAction::PLA_CALCULATE_STATISTICS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "replacePropertiesFolder" ) )
|
if ( cvf::Option o = progOpt->option( "replacePropertiesFolder" ) )
|
||||||
@ -328,7 +328,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
{
|
{
|
||||||
RiaProjectModifier projectModifier;
|
RiaProjectModifier projectModifier;
|
||||||
projectModifier.setReplaceCaseFirstOccurrence( caseFile );
|
projectModifier.setReplaceCaseFirstOccurrence( caseFile );
|
||||||
loadProject( projectFileName, RiaApplication::PLA_NONE, &projectModifier );
|
loadProject( projectFileName, RiaApplication::ProjectLoadAction::PLA_NONE, &projectModifier );
|
||||||
executeCommandFile( commandFile );
|
executeCommandFile( commandFile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadProject( projectFileName, RiaApplication::PLA_NONE, &projectModifier );
|
loadProject( projectFileName, RiaApplication::ProjectLoadAction::PLA_NONE, &projectModifier );
|
||||||
executeCommandFile( commandFile );
|
executeCommandFile( commandFile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -366,10 +366,10 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
|||||||
{
|
{
|
||||||
executeCommandFile( commandFile );
|
executeCommandFile( commandFile );
|
||||||
}
|
}
|
||||||
return EXIT_COMPLETED;
|
return ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return KEEP_GOING;
|
return ApplicationStatus::KEEP_GOING;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -144,11 +144,11 @@ namespace caf
|
|||||||
template <>
|
template <>
|
||||||
void AppEnum<RiaGuiApplication::RINavigationPolicy>::setUp()
|
void AppEnum<RiaGuiApplication::RINavigationPolicy>::setUp()
|
||||||
{
|
{
|
||||||
addItem( RiaGuiApplication::NAVIGATION_POLICY_CEETRON, "NAVIGATION_POLICY_CEETRON", "Ceetron" );
|
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CEETRON, "NAVIGATION_POLICY_CEETRON", "Ceetron" );
|
||||||
addItem( RiaGuiApplication::NAVIGATION_POLICY_CAD, "NAVIGATION_POLICY_CAD", "CAD" );
|
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CAD, "NAVIGATION_POLICY_CAD", "CAD" );
|
||||||
addItem( RiaGuiApplication::NAVIGATION_POLICY_GEOQUEST, "NAVIGATION_POLICY_GEOQUEST", "GEOQUEST" );
|
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_GEOQUEST, "NAVIGATION_POLICY_GEOQUEST", "GEOQUEST" );
|
||||||
addItem( RiaGuiApplication::NAVIGATION_POLICY_RMS, "NAVIGATION_POLICY_RMS", "RMS" );
|
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS, "NAVIGATION_POLICY_RMS", "RMS" );
|
||||||
setDefault( RiaGuiApplication::NAVIGATION_POLICY_RMS );
|
setDefault( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS );
|
||||||
}
|
}
|
||||||
} // namespace caf
|
} // namespace caf
|
||||||
|
|
||||||
@ -445,14 +445,14 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
// --------------------------------------------------------
|
// --------------------------------------------------------
|
||||||
if ( cvf::Option o = progOpt->option( "ignoreArgs" ) )
|
if ( cvf::Option o = progOpt->option( "ignoreArgs" ) )
|
||||||
{
|
{
|
||||||
return KEEP_GOING;
|
return ApplicationStatus::KEEP_GOING;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( progOpt->option( "help" ) || progOpt->option( "?" ) )
|
if ( progOpt->option( "help" ) || progOpt->option( "?" ) )
|
||||||
{
|
{
|
||||||
this->showFormattedTextInMessageBoxOrConsole( "The current command line options in ResInsight are:\n" +
|
this->showFormattedTextInMessageBoxOrConsole( "The current command line options in ResInsight are:\n" +
|
||||||
this->commandLineParameterHelp() );
|
this->commandLineParameterHelp() );
|
||||||
return RiaApplication::EXIT_COMPLETED;
|
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Code generation
|
// Code generation
|
||||||
@ -466,10 +466,10 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
if ( !RiaApplication::generateCode( outputFile, &errMsg ) )
|
if ( !RiaApplication::generateCode( outputFile, &errMsg ) )
|
||||||
{
|
{
|
||||||
RiaLogging::error( QString( "Error: %1" ).arg( errMsg ) );
|
RiaLogging::error( QString( "Error: %1" ).arg( errMsg ) );
|
||||||
return RiaApplication::EXIT_WITH_ERROR;
|
return RiaApplication::ApplicationStatus::EXIT_WITH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
return RiaApplication::EXIT_COMPLETED;
|
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unit testing
|
// Unit testing
|
||||||
@ -479,12 +479,12 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
int testReturnValue = launchUnitTestsWithConsole();
|
int testReturnValue = launchUnitTestsWithConsole();
|
||||||
if ( testReturnValue == 0 )
|
if ( testReturnValue == 0 )
|
||||||
{
|
{
|
||||||
return RiaApplication::EXIT_COMPLETED;
|
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RiaLogging::error( "Error running unit tests" );
|
RiaLogging::error( "Error running unit tests" );
|
||||||
return RiaApplication::EXIT_WITH_ERROR;
|
return RiaApplication::ApplicationStatus::EXIT_WITH_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +502,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
RiaLogging::setLoggerInstance( stdLogger );
|
RiaLogging::setLoggerInstance( stdLogger );
|
||||||
|
|
||||||
RiaRegressionTestRunner::instance()->executeRegressionTests( regressionTestPath, QStringList() );
|
RiaRegressionTestRunner::instance()->executeRegressionTests( regressionTestPath, QStringList() );
|
||||||
return EXIT_COMPLETED;
|
return ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "updateregressiontestbase" ) )
|
if ( cvf::Option o = progOpt->option( "updateregressiontestbase" ) )
|
||||||
@ -510,7 +510,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
CVF_ASSERT( o.valueCount() == 1 );
|
CVF_ASSERT( o.valueCount() == 1 );
|
||||||
QString regressionTestPath = cvfqt::Utils::toQString( o.value( 0 ) );
|
QString regressionTestPath = cvfqt::Utils::toQString( o.value( 0 ) );
|
||||||
RiaRegressionTestRunner::instance()->updateRegressionTest( regressionTestPath );
|
RiaRegressionTestRunner::instance()->updateRegressionTest( regressionTestPath );
|
||||||
return EXIT_COMPLETED;
|
return ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "startdir" ) )
|
if ( cvf::Option o = progOpt->option( "startdir" ) )
|
||||||
@ -587,14 +587,14 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
std::vector<QString> gridFiles = readFileListFromTextFile( gridListFile );
|
std::vector<QString> gridFiles = readFileListFromTextFile( gridListFile );
|
||||||
runMultiCaseSnapshots( projectFileName, gridFiles, "multiCaseSnapshots" );
|
runMultiCaseSnapshots( projectFileName, gridFiles, "multiCaseSnapshots" );
|
||||||
|
|
||||||
return EXIT_COMPLETED;
|
return ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !projectFileName.isEmpty() )
|
if ( !projectFileName.isEmpty() )
|
||||||
{
|
{
|
||||||
cvf::ref<RiaProjectModifier> projectModifier;
|
cvf::ref<RiaProjectModifier> projectModifier;
|
||||||
RiaApplication::ProjectLoadAction projectLoadAction = RiaApplication::PLA_NONE;
|
RiaApplication::ProjectLoadAction projectLoadAction = RiaApplication::ProjectLoadAction::PLA_NONE;
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "replaceCase" ) )
|
if ( cvf::Option o = progOpt->option( "replaceCase" ) )
|
||||||
{
|
{
|
||||||
@ -651,7 +651,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
projectLoadAction = RiaApplication::PLA_CALCULATE_STATISTICS;
|
projectLoadAction = RiaApplication::ProjectLoadAction::PLA_CALCULATE_STATISTICS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "replacePropertiesFolder" ) )
|
if ( cvf::Option o = progOpt->option( "replacePropertiesFolder" ) )
|
||||||
@ -780,7 +780,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
|
|
||||||
closeProject();
|
closeProject();
|
||||||
|
|
||||||
return EXIT_COMPLETED;
|
return ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "commandFile" ) )
|
if ( cvf::Option o = progOpt->option( "commandFile" ) )
|
||||||
@ -831,7 +831,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
{
|
{
|
||||||
RiaProjectModifier projectModifier;
|
RiaProjectModifier projectModifier;
|
||||||
projectModifier.setReplaceCaseFirstOccurrence( caseFile );
|
projectModifier.setReplaceCaseFirstOccurrence( caseFile );
|
||||||
loadProject( projectFileName, RiaApplication::PLA_NONE, &projectModifier );
|
loadProject( projectFileName, RiaApplication::ProjectLoadAction::PLA_NONE, &projectModifier );
|
||||||
executeCommandFile( commandFile );
|
executeCommandFile( commandFile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -860,7 +860,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadProject( projectFileName, RiaApplication::PLA_NONE, &projectModifier );
|
loadProject( projectFileName, RiaApplication::ProjectLoadAction::PLA_NONE, &projectModifier );
|
||||||
executeCommandFile( commandFile );
|
executeCommandFile( commandFile );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -869,10 +869,10 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
{
|
{
|
||||||
executeCommandFile( commandFile );
|
executeCommandFile( commandFile );
|
||||||
}
|
}
|
||||||
return EXIT_COMPLETED;
|
return ApplicationStatus::EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return KEEP_GOING;
|
return ApplicationStatus::KEEP_GOING;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1762,7 +1762,7 @@ void RiaGuiApplication::runMultiCaseSnapshots( const QString& templateProj
|
|||||||
RiaProjectModifier modifier;
|
RiaProjectModifier modifier;
|
||||||
modifier.setReplaceCaseFirstOccurrence( gridFn );
|
modifier.setReplaceCaseFirstOccurrence( gridFn );
|
||||||
|
|
||||||
bool loadOk = loadProject( templateProjectFileName, PLA_NONE, &modifier );
|
bool loadOk = loadProject( templateProjectFileName, ProjectLoadAction::PLA_NONE, &modifier );
|
||||||
if ( loadOk )
|
if ( loadOk )
|
||||||
{
|
{
|
||||||
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( snapshotFolderName );
|
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( snapshotFolderName );
|
||||||
|
@ -76,7 +76,7 @@ class RiaGuiApplication : public QApplication, public RiaApplication
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum RINavigationPolicy
|
enum class RINavigationPolicy
|
||||||
{
|
{
|
||||||
NAVIGATION_POLICY_CEETRON,
|
NAVIGATION_POLICY_CEETRON,
|
||||||
NAVIGATION_POLICY_CAD,
|
NAVIGATION_POLICY_CAD,
|
||||||
|
@ -94,15 +94,15 @@ int main( int argc, char* argv[] )
|
|||||||
|
|
||||||
RiaApplication::ApplicationStatus status = app->handleArguments( &progOpt );
|
RiaApplication::ApplicationStatus status = app->handleArguments( &progOpt );
|
||||||
|
|
||||||
if ( status == RiaApplication::EXIT_COMPLETED )
|
if ( status == RiaApplication::ApplicationStatus::EXIT_COMPLETED )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if ( status == RiaApplication::EXIT_WITH_ERROR )
|
else if ( status == RiaApplication::ApplicationStatus::EXIT_WITH_ERROR )
|
||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
else if ( status == RiaApplication::KEEP_GOING )
|
else if ( status == RiaApplication::ApplicationStatus::KEEP_GOING )
|
||||||
{
|
{
|
||||||
int exitCode = 0;
|
int exitCode = 0;
|
||||||
try
|
try
|
||||||
|
@ -92,7 +92,8 @@ RiaPreferences::RiaPreferences( void )
|
|||||||
{
|
{
|
||||||
CAF_PDM_InitField( &m_navigationPolicy,
|
CAF_PDM_InitField( &m_navigationPolicy,
|
||||||
"navigationPolicy",
|
"navigationPolicy",
|
||||||
caf::AppEnum<RiaGuiApplication::RINavigationPolicy>( RiaGuiApplication::NAVIGATION_POLICY_RMS ),
|
caf::AppEnum<RiaGuiApplication::RINavigationPolicy>(
|
||||||
|
RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS ),
|
||||||
"Navigation Mode",
|
"Navigation Mode",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
@ -91,7 +91,9 @@ caf::PdmScriptResponse RicfSingleCaseReplace::execute()
|
|||||||
projectModifier->setReplaceCase( m_caseId(), filePath );
|
projectModifier->setReplaceCase( m_caseId(), filePath );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !RiaApplication::instance()->loadProject( lastProjectPath, RiaApplication::PLA_NONE, projectModifier.p() ) )
|
if ( !RiaApplication::instance()->loadProject( lastProjectPath,
|
||||||
|
RiaApplication::ProjectLoadAction::PLA_NONE,
|
||||||
|
projectModifier.p() ) )
|
||||||
{
|
{
|
||||||
QString errMsg( "Could not reload project" );
|
QString errMsg( "Could not reload project" );
|
||||||
RiaLogging::error( errMsg );
|
RiaLogging::error( errMsg );
|
||||||
@ -161,7 +163,9 @@ caf::PdmScriptResponse RicfMultiCaseReplace::execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !RiaApplication::instance()->loadProject( lastProjectPath, RiaApplication::PLA_NONE, projectModifier.p() ) )
|
if ( !RiaApplication::instance()->loadProject( lastProjectPath,
|
||||||
|
RiaApplication::ProjectLoadAction::PLA_NONE,
|
||||||
|
projectModifier.p() ) )
|
||||||
{
|
{
|
||||||
QString errMsg( "Could not reload project" );
|
QString errMsg( "Could not reload project" );
|
||||||
RiaLogging::error( errMsg );
|
RiaLogging::error( errMsg );
|
||||||
|
@ -71,7 +71,7 @@ caf::PdmScriptResponse RicfReplaceSourceCases::execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !RiaApplication::instance()->loadProject( lastProjectPath,
|
if ( !RiaApplication::instance()->loadProject( lastProjectPath,
|
||||||
RiaApplication::PLA_CALCULATE_STATISTICS,
|
RiaApplication::ProjectLoadAction::PLA_CALCULATE_STATISTICS,
|
||||||
projectModifier.p() ) )
|
projectModifier.p() ) )
|
||||||
{
|
{
|
||||||
QString error( "Could not reload project" );
|
QString error( "Could not reload project" );
|
||||||
|
@ -930,19 +930,19 @@ void RiuViewer::updateNavigationPolicy()
|
|||||||
{
|
{
|
||||||
switch ( RiaGuiApplication::instance()->navigationPolicy() )
|
switch ( RiaGuiApplication::instance()->navigationPolicy() )
|
||||||
{
|
{
|
||||||
case RiaGuiApplication::NAVIGATION_POLICY_CAD:
|
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CAD:
|
||||||
setNavigationPolicy( new RiuCadNavigation );
|
setNavigationPolicy( new RiuCadNavigation );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RiaGuiApplication::NAVIGATION_POLICY_CEETRON:
|
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CEETRON:
|
||||||
setNavigationPolicy( new caf::CeetronPlusNavigation );
|
setNavigationPolicy( new caf::CeetronPlusNavigation );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RiaGuiApplication::NAVIGATION_POLICY_GEOQUEST:
|
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_GEOQUEST:
|
||||||
setNavigationPolicy( new RiuGeoQuestNavigation );
|
setNavigationPolicy( new RiuGeoQuestNavigation );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RiaGuiApplication::NAVIGATION_POLICY_RMS:
|
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS:
|
||||||
setNavigationPolicy( new RiuRmsNavigation );
|
setNavigationPolicy( new RiuRmsNavigation );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user