4 #include <QApplication> 11 #include "MainWindow.h" 18 HelpTool::HelpTool(
QWidget *parent) : Tool(parent) {
19 p_whatsThis =
new QAction(parent);
20 p_whatsThis->setShortcut(Qt::SHIFT + Qt::Key_F1);
21 p_whatsThis->setText(
"&What's This?");
22 p_whatsThis->setIcon(QPixmap(toolIconDir() +
"/contexthelp.png"));
23 p_whatsThis->setToolTip(
"What's This");
25 "<b>Function:</b> Use this to get longer descriptions of button \ 27 <p><b>Shortcut:</b> Shift+F1</p>";
28 p_whatsThis->setWhatsThis(whatsThis);
29 connect(p_whatsThis, SIGNAL(triggered()),
this, SLOT(whatsThis()));
31 p_aboutProgram =
new QAction(parent);
32 p_aboutProgram->setShortcut(Qt::CTRL + Qt::Key_H);
34 s += QApplication::applicationName();
35 p_aboutProgram->setText(s);
36 connect(p_aboutProgram, SIGNAL(triggered()),
this, SLOT(aboutProgram()));
42 menu->addAction(p_whatsThis);
43 menu->addAction(p_aboutProgram);
48 perm->addAction(p_whatsThis);
52 void HelpTool::whatsThis() {
53 QWhatsThis::enterWhatsThisMode();
64 "$ISISROOT/doc/Application/presentation/PrinterFriendly/" +
65 QApplication::applicationName() +
"/" +
66 QApplication::applicationName() +
".html");
68 PvlGroup &uig = Preference::Preferences().findGroup(
"UserInterface");
69 QString command = (QString) uig[
"GuiHelpBrowser"] +
70 (QString)
" file:" + file.
expanded() +
" &";
71 if(system(command.toLatin1().data()) != 0) {
72 IString msg =
"Failed to execute [" + command +
"]";
File name manipulation and expansion.
This error is for when a programmer made an API call that was illegal.
Contains multiple PvlContainers.
#define _FILEINFO_
Macro for the filename and line number.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.