mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4852 Command Line : Add snapshotexportfolder
This commit is contained in:
@@ -683,6 +683,13 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString snapshotFolderFromCommandLine;
|
||||||
|
if ( cvf::Option o = progOpt->option( "snapshotfolder" ) )
|
||||||
|
{
|
||||||
|
CVF_ASSERT( o.valueCount() == 1 );
|
||||||
|
snapshotFolderFromCommandLine = cvfqt::Utils::toQString( o.value( 0 ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "summaryplot" ) )
|
if ( cvf::Option o = progOpt->option( "summaryplot" ) )
|
||||||
{
|
{
|
||||||
RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( cvfqt::Utils::toQStringList( o.values() ) );
|
RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( cvfqt::Utils::toQStringList( o.values() ) );
|
||||||
@@ -846,7 +853,16 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString exportFolder = QDir::currentPath() + "/snapshots";
|
QString snapshotFolder;
|
||||||
|
|
||||||
|
if ( snapshotFolderFromCommandLine.isEmpty() )
|
||||||
|
{
|
||||||
|
snapshotFolder = QDir::currentPath() + "/snapshots";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snapshotFolder = snapshotFolderFromCommandLine;
|
||||||
|
}
|
||||||
|
|
||||||
if ( snapshotPlots )
|
if ( snapshotPlots )
|
||||||
{
|
{
|
||||||
@@ -863,7 +879,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
|
|
||||||
processEvents();
|
processEvents();
|
||||||
|
|
||||||
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( exportFolder );
|
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( snapshotFolder );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -880,7 +896,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
|
|
||||||
processEvents();
|
processEvents();
|
||||||
|
|
||||||
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( exportFolder );
|
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( snapshotFolder );
|
||||||
}
|
}
|
||||||
|
|
||||||
auto mainPlotWnd = mainPlotWindow();
|
auto mainPlotWnd = mainPlotWindow();
|
||||||
@@ -891,9 +907,11 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
|
|
||||||
RiuMainWindow::instance()->loadWinGeoAndDockToolBarLayout();
|
RiuMainWindow::instance()->loadWinGeoAndDockToolBarLayout();
|
||||||
|
|
||||||
closeProject();
|
/*
|
||||||
|
closeProject();
|
||||||
|
|
||||||
return EXIT_COMPLETED;
|
return EXIT_COMPLETED;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( cvf::Option o = progOpt->option( "commandFile" ) )
|
if ( cvf::Option o = progOpt->option( "commandFile" ) )
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
|
|||||||
"<width> <height>",
|
"<width> <height>",
|
||||||
"Set size of exported snapshot images.",
|
"Set size of exported snapshot images.",
|
||||||
cvf::ProgramOptions::MULTI_VALUE );
|
cvf::ProgramOptions::MULTI_VALUE );
|
||||||
|
progOpt->registerOption( "snapshotfolder",
|
||||||
|
"<folder>",
|
||||||
|
"Set the destination folder for exported snapshot images.\n",
|
||||||
|
cvf::ProgramOptions::SINGLE_VALUE );
|
||||||
progOpt->registerOption( "savesnapshots",
|
progOpt->registerOption( "savesnapshots",
|
||||||
"all|views|plots",
|
"all|views|plots",
|
||||||
"Save snapshot of all views or plots to project file location sub folder 'snapshots'. "
|
"Save snapshot of all views or plots to project file location sub folder 'snapshots'. "
|
||||||
|
|||||||
Reference in New Issue
Block a user