10#include "IException.h"
11#include "MainWindow.h"
13#include "Preference.h"
14#include "ProgramLauncher.h"
19 HelpTool::HelpTool(
QWidget *parent) : Tool(parent) {
20 p_whatsThis =
new QAction(parent);
21 p_whatsThis->setShortcut(Qt::SHIFT + Qt::Key_F1);
22 p_whatsThis->setText(
"&What's This?");
23 p_whatsThis->setIcon(QPixmap(toolIconDir() +
"/contexthelp.png"));
24 p_whatsThis->setToolTip(
"What's This");
26 "<b>Function:</b> Use this to get longer descriptions of button \
28 <p><b>Shortcut:</b> Shift+F1</p>";
29 p_whatsThis->setWhatsThis(whatsThis);
30 connect(p_whatsThis, SIGNAL(triggered()),
this, SLOT(whatsThis()));
32 p_aboutProgram =
new QAction(parent);
33 p_aboutProgram->setShortcut(Qt::CTRL + Qt::Key_H);
35 s += QApplication::applicationName();
36 p_aboutProgram->setText(s);
37 connect(p_aboutProgram, SIGNAL(triggered()),
this, SLOT(aboutProgram()));
42 void HelpTool::addTo(
QMenu *menu) {
43 menu->addAction(p_whatsThis);
44 menu->addAction(p_aboutProgram);
48 void HelpTool::addToPermanent(
QToolBar *perm) {
49 perm->addAction(p_whatsThis);
53 void HelpTool::whatsThis() {
54 QWhatsThis::enterWhatsThisMode();
63 void HelpTool::aboutProgram() {
64 PvlGroup &uig = Preference::Preferences().findGroup(
"UserInterface");
66 QString command = (QString) uig[
"GuiHelpBrowser"] +
67 " http://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/" +
68 QApplication::applicationName() +
"/" +
69 QApplication::applicationName() +
".html";
70#elif defined(__APPLE__)
71 QString command =
"open -a" + (QString) uig[
"GuiHelpBrowser"] +
72 " http://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/" +
73 QApplication::applicationName() +
"/" +
74 QApplication::applicationName() +
".html";
76 ProgramLauncher::RunSystemCommand(command);
Contains multiple PvlContainers.
This is free and unencumbered software released into the public domain.