mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Open Users Guide url from Help menu
This commit is contained in:
parent
84bc586f9a
commit
a74be74792
@ -281,6 +281,8 @@ void RiuMainWindow::createActions()
|
|||||||
connect(m_aboutAction, SIGNAL(triggered()), SLOT(slotAbout()));
|
connect(m_aboutAction, SIGNAL(triggered()), SLOT(slotAbout()));
|
||||||
m_commandLineHelpAction = new QAction("&Command Line Help", this);
|
m_commandLineHelpAction = new QAction("&Command Line Help", this);
|
||||||
connect(m_commandLineHelpAction, SIGNAL(triggered()), SLOT(slotShowCommandLineHelp()));
|
connect(m_commandLineHelpAction, SIGNAL(triggered()), SLOT(slotShowCommandLineHelp()));
|
||||||
|
m_openUsersGuideInBrowserAction = new QAction("&Users Guide", this);
|
||||||
|
connect(m_openUsersGuideInBrowserAction, SIGNAL(triggered()), SLOT(slotOpenUsersGuideInBrowserAction()));
|
||||||
|
|
||||||
// Draw style actions
|
// Draw style actions
|
||||||
m_dsActionGroup = new QActionGroup(this);
|
m_dsActionGroup = new QActionGroup(this);
|
||||||
@ -390,6 +392,7 @@ void RiuMainWindow::createMenus()
|
|||||||
|
|
||||||
// Help menu
|
// Help menu
|
||||||
QMenu* helpMenu = menuBar()->addMenu("&Help");
|
QMenu* helpMenu = menuBar()->addMenu("&Help");
|
||||||
|
helpMenu->addAction(m_openUsersGuideInBrowserAction);
|
||||||
helpMenu->addAction(m_aboutAction);
|
helpMenu->addAction(m_aboutAction);
|
||||||
helpMenu->addAction(m_commandLineHelpAction);
|
helpMenu->addAction(m_commandLineHelpAction);
|
||||||
}
|
}
|
||||||
@ -1798,3 +1801,17 @@ void RiuMainWindow::slotAddWellCellsToRangeFilterAction(bool doAdd)
|
|||||||
riv->wellCollection()->wellCellsToRangeFilterMode.setValueFromUi(static_cast<unsigned int>(rangeAddType.index()));
|
riv->wellCollection()->wellCellsToRangeFilterMode.setValueFromUi(static_cast<unsigned int>(rangeAddType.index()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuMainWindow::slotOpenUsersGuideInBrowserAction()
|
||||||
|
{
|
||||||
|
QString usersGuideUrl = "https://github.com/OPM/ResInsight/blob/internal/Documentation/UsersGuide/UsersGuide.md";
|
||||||
|
|
||||||
|
if (!QDesktopServices::openUrl(usersGuideUrl))
|
||||||
|
{
|
||||||
|
QErrorMessage* errorHandler = QErrorMessage::qtHandler();
|
||||||
|
errorHandler->showMessage("Failed open browser with the following url\n\n" + usersGuideUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -163,6 +163,7 @@ private:
|
|||||||
// Help actions
|
// Help actions
|
||||||
QAction* m_aboutAction;
|
QAction* m_aboutAction;
|
||||||
QAction* m_commandLineHelpAction;
|
QAction* m_commandLineHelpAction;
|
||||||
|
QAction* m_openUsersGuideInBrowserAction;
|
||||||
|
|
||||||
// Animation
|
// Animation
|
||||||
caf::AnimationToolBar* m_animationToolBar;
|
caf::AnimationToolBar* m_animationToolBar;
|
||||||
@ -245,6 +246,7 @@ private slots:
|
|||||||
// Help slots
|
// Help slots
|
||||||
void slotAbout();
|
void slotAbout();
|
||||||
void slotShowCommandLineHelp();
|
void slotShowCommandLineHelp();
|
||||||
|
void slotOpenUsersGuideInBrowserAction();
|
||||||
|
|
||||||
void slotSubWindowActivated(QMdiSubWindow* subWindow);
|
void slotSubWindowActivated(QMdiSubWindow* subWindow);
|
||||||
void slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous);
|
void slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous);
|
||||||
|
Loading…
Reference in New Issue
Block a user