Skip to content

Commit

Permalink
Refs #4565. Adding wiki help menu option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Jan 20, 2012
1 parent 12e2ae7 commit 386419f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ protected slots:
void onColorOptions();
/// Pop-up the rotation point dialog.
void onRotationPoint();
/// Show the wiki help in a browser.
void onWikiHelp();
/**
* Load and render data from the given source.
* @param source a ParaView compatible source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@
#include <pqVerifyRequiredPluginBehavior.h>

#include <QAction>
#include <QDesktopServices>
#include <QHBoxLayout>
#include <QMainWindow>
#include <QMenuBar>
#include <QModelIndex>
#include <QUrl>
#include <QWidget>

#include <iostream>
Expand Down Expand Up @@ -464,6 +466,15 @@ void MdViewerWidget::createMenus()
this, SLOT(onColorOptions()));
viewMenu->addAction(colorAction);

QMenu *helpMenu = menubar->addMenu(QApplication::tr("&Help"));

QAction *wikiHelpAction = new QAction(QApplication::tr("Show Wiki Help"), this);
wikiHelpAction->setShortcut(QKeySequence::fromString("Ctrl+Shift+H"));
wikiHelpAction->setStatusTip(QApplication::tr("Show the wiki help page in a browser."));
QObject::connect(wikiHelpAction, SIGNAL(triggered()),
this, SLOT(onWikiHelp()));
helpMenu->addAction(wikiHelpAction);

if (this->pluginMode)
{
this->ui.verticalLayout->insertWidget(0, menubar);
Expand Down Expand Up @@ -513,6 +524,16 @@ void MdViewerWidget::onRotationPoint()
this->rotPointDialog->activateWindow();
}

/**
* This function shows the wiki help page for the simple interface in a
* browser.
*/
void MdViewerWidget::onWikiHelp()
{
QDesktopServices::openUrl(QUrl(QString("http://www.mantidproject.org/") +
"VatesSimpleInterface"));
}

/**
* This function disconnects the present instances of the color options and the
* point rotation dialog boxes from the current view. This is necessary on
Expand Down

0 comments on commit 386419f

Please sign in to comment.