mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8728 Help Menu : Add search issues and create new issue
This commit is contained in:
@@ -41,6 +41,8 @@ CAF_CMD_SOURCE_INIT( RicHelpCommandLineFeature, "RicHelpCommandLineFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicHelpSummaryCommandLineFeature, "RicHelpSummaryCommandLineFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicHelpOpenUsersGuideFeature, "RicHelpOpenUsersGuideFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicSearchHelpFeature, "RicSearchHelpFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicSearchIssuesHelpFeature, "RicSearchIssuesHelpFeature" );
|
||||
CAF_CMD_SOURCE_INIT( RicCreateNewIssueHelpFeature, "RicCreateNewIssueHelpFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -308,3 +310,65 @@ void RicSearchHelpFeature::setupActionLook( QAction* actionToSetup )
|
||||
|
||||
applyShortcutWithHintToAction( actionToSetup, QKeySequence::HelpContents );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSearchIssuesHelpFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSearchIssuesHelpFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
QString usersGuideUrl = "https://github.com/OPM/ResInsight/issues";
|
||||
|
||||
if ( !QDesktopServices::openUrl( usersGuideUrl ) )
|
||||
{
|
||||
QErrorMessage* errorHandler = QErrorMessage::qtHandler();
|
||||
errorHandler->showMessage( "Failed open browser with the following url\n\n" + usersGuideUrl );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSearchIssuesHelpFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Search Issues" );
|
||||
actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateNewIssueHelpFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCreateNewIssueHelpFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
QString usersGuideUrl = "https://github.com/OPM/ResInsight/issues/new";
|
||||
|
||||
if ( !QDesktopServices::openUrl( usersGuideUrl ) )
|
||||
{
|
||||
QErrorMessage* errorHandler = QErrorMessage::qtHandler();
|
||||
errorHandler->showMessage( "Failed open browser with the following url\n\n" + usersGuideUrl );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCreateNewIssueHelpFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Create New Issue" );
|
||||
actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user