#4793 Summary Plot Templates : Help accessible from About menu

This commit is contained in:
Magne Sjaastad
2019-09-27 15:15:09 +02:00
parent 856596c366
commit 1ab58449bd
6 changed files with 94 additions and 33 deletions

View File

@@ -283,32 +283,9 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
{
if ( arguments[optionIdx] == "-help" )
{
// clang-format off
RiaApplication::instance()->showFormattedTextInMessageBoxOrConsole(
"The --summaryplot option has the following syntax:\n"
"\n"
"[<plotOptions>] <eclipsesummaryvectorfilters> [<eclipsedatafiles>]\n"
"\n"
"It Creates one summary plot for each of the the summary vectors matched by the "
"<eclipsesummaryvectorfilters> using all the <eclipsedatafiles> in each plot.\n"
"The <eclipsesummaryvectorfilters> has the syntax <vectorname>[:<item>[:<subitem>[:i,j,k]]] and can be repeated.\n"
"Wildcards can also be used, eg. \"WOPT:*\" to select the total oil production from all the wells.\n"
"3D Grid properties from restart files can also be requested in the form <propertyname>:i,i,k.\n"
"The <eclipsedatafiles> can be written with or without extension.\n"
"As long as only summary vectors are requested, only the corresponding SMSPEC file will be opened for each case.\n"
"If a grid property is requested, however (eg. SOIL:20,21,1) the corresponding EGRID and restart data will be loaded as well.\n"
"\n"
"The summary plot options are: \n"
" -help\t Show this help text and ignore the rest of the options.\n"
" -h\t Include history vectors. Will be read from the summary file if the vectors exist.\n"
" \t Only history vectors from the first summary case in the project will be included.\n"
" -nl\t Omit legend in plot.\n"
" -s\t Create only one plot including all the defined vectors and cases.\n"
" -n\t Scale all curves into the range 0.0-1.0. Useful when using -s.\n"
" -e\t Import all the cases as an ensemble, and create ensemble curves sets instead of single curves.\n"
" -c <parametername>\t Same as -e, but colors the curves by the ensemble parameter <parametername> . \n"
" -cl <parametername>\t Same as -c, but uses logarithmic legend.\n" );
// clang-format on
QString text = RicSummaryPlotFeatureImpl::summaryPlotCommandLineHelpText();
RiaApplication::instance()->showFormattedTextInMessageBoxOrConsole( text );
return;
}
@@ -418,7 +395,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
if ( summaryAddressFilters.size() )
{
RimSummaryCaseCollection* ensemble = nullptr;
RimSummaryCaseCollection* ensemble = nullptr;
if ( isEnsembleMode )
{
@@ -680,9 +657,9 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
RiuPlotMainWindow* mpw = RiaGuiApplication::instance()->mainPlotWindow();
// Needed to avoid unneccessary activation of sub windows (plots)
// which results in population of property editor, and missing deleteLater because we are outside any event loop
// when switching object. Results in stray widgets.
mpw->setBlockSlotSubWindowActivated( true );
// which results in population of property editor, and missing deleteLater because we are outside any event
// loop when switching object. Results in stray widgets.
mpw->setBlockSlotSubWindowActivated( true );
RiuPlotMainWindowTools::showPlotMainWindow();
mpw->setBlockSlotSubWindowActivated( false );
RiuPlotMainWindowTools::setExpanded( lastPlotCreated );
@@ -845,3 +822,38 @@ void RicSummaryPlotFeatureImpl::filteredSummaryAdressesFromCase(
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicSummaryPlotFeatureImpl::summaryPlotCommandLineHelpText()
{
// clang-format off
QString txt =
"The --summaryplot option has the following syntax:\n"
"\n"
"[<plotOptions>] <eclipsesummaryvectorfilters> [<eclipsedatafiles>]\n"
"\n"
"It creates one summary plot for each of the the summary vectors matched by the "
"<eclipsesummaryvectorfilters> using all the <eclipsedatafiles> in each plot.\n"
"The <eclipsesummaryvectorfilters> has the syntax <vectorname>[:<item>[:<subitem>[:i,j,k]]] and can be repeated.\n"
"Wildcards can also be used, eg. \"WOPT:*\" to select the total oil production from all the wells.\n"
"3D Grid properties from restart files can also be requested in the form <propertyname>:i,i,k.\n"
"The <eclipsedatafiles> can be written with or without extension.\n"
"As long as only summary vectors are requested, only the corresponding SMSPEC file will be opened for each case.\n"
"If a grid property is requested, however (eg. SOIL:20,21,1) the corresponding EGRID and restart data will be loaded as well.\n"
"\n"
"The summary plot options are: \n"
" -help\t Show this help text and ignore the rest of the options.\n"
" -h\t Include history vectors. Will be read from the summary file if the vectors exist.\n"
" \t Only history vectors from the first summary case in the project will be included.\n"
" -nl\t Omit legend in plot.\n"
" -s\t Create only one plot including all the defined vectors and cases.\n"
" -n\t Scale all curves into the range 0.0-1.0. Useful when using -s.\n"
" -e\t Import all the cases as an ensemble, and create ensemble curves sets instead of single curves.\n"
" -c <parametername>\t Same as -e, but colors the curves by the ensemble parameter <parametername> . \n"
" -cl <parametername>\t Same as -c, but uses logarithmic legend.\n";
// clang-format on
return txt;
}

View File

@@ -44,6 +44,8 @@ public:
std::set<RifEclipseSummaryAddress>* setToInsertFilteredAddressesIn,
std::vector<bool>* usedFilters );
static QString summaryPlotCommandLineHelpText();
private:
static std::vector<RimSummaryCurve*> addCurvesFromAddressFiltersToPlot( const QStringList& curveFilters,
RimSummaryPlot* plot,