#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

@@ -18,6 +18,8 @@
#include "RicHelpFeatures.h"
#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h"
#include "RiaApplication.h"
#include "RiaBaseDefs.h"
#include "RiaVersionInfo.h"
@@ -35,6 +37,7 @@
CAF_CMD_SOURCE_INIT( RicHelpAboutFeature, "RicHelpAboutFeature" );
CAF_CMD_SOURCE_INIT( RicHelpCommandLineFeature, "RicHelpCommandLineFeature" );
CAF_CMD_SOURCE_INIT( RicHelpSummaryCommandLineFeature, "RicHelpSummaryCommandLineFeature" );
CAF_CMD_SOURCE_INIT( RicHelpOpenUsersGuideFeature, "RicHelpOpenUsersGuideFeature" );
//--------------------------------------------------------------------------------------------------
@@ -205,6 +208,34 @@ void RicHelpCommandLineFeature::setupActionLook( QAction* actionToSetup )
actionToSetup->setText( "&Command Line Help" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicHelpSummaryCommandLineFeature::isCommandEnabled()
{
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicHelpSummaryCommandLineFeature::onActionTriggered( bool isChecked )
{
this->disableModelChangeContribution();
RiaApplication* app = RiaApplication::instance();
QString text = RicSummaryPlotFeatureImpl::summaryPlotCommandLineHelpText();
app->showFormattedTextInMessageBoxOrConsole( text );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicHelpSummaryCommandLineFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "&Summary Command Line Help" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -48,6 +48,20 @@ protected:
void setupActionLook( QAction* actionToSetup ) override;
};
//==================================================================================================
///
//==================================================================================================
class RicHelpSummaryCommandLineFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
bool isCommandEnabled() override;
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};
//==================================================================================================
///
//==================================================================================================