Unverified Commit ca52e8f9 authored by Amy Stamile's avatar Amy Stamile Committed by GitHub
Browse files

Fixed "About Qview" to point to website documentation (#4371)

* Updates AboutProgram to point to website docs

* Updates HelpTool aboutProgram to point to website.

* Specified separate command per OS system.

* Updated About Isis to be functional on Macs. commented out image srcs in qview xml.
parent 6b1778f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ release.

- Fixed relative paths not being properly converted to absolute paths in isisVarInit.py [4274](https://github.com/USGS-Astrogeology/ISIS3/issues/4274)
- Fixed issue where serial numbers for Kaguya TC and MI image could not be generated. [4235](https://github.com/USGS-Astrogeology/ISIS3/issues/4235)
- Fixed "About Qview" to point to website documentation. [4333](https://github.com/USGS-Astrogeology/ISIS3/issues/4333)

### Changed

+21 −14
Original line number Diff line number Diff line
@@ -874,23 +874,30 @@ namespace Isis {
  // Show help for Isis
  void Gui::AboutIsis() {
    Isis::PvlGroup &uig = Isis::Preference::Preferences().findGroup("UserInterface");
#if defined(__linux__)
    QString command = (QString) uig["GuiHelpBrowser"] +
                          " http://isis.astrogeology.usgs.gov >> /dev/null &";
#elif defined(__APPLE__)
    QString command = "open -a" + (QString) uig["GuiHelpBrowser"] +
                      " http://isis.astrogeology.usgs.gov >> /dev/null &";
#endif                  
    ProgramLauncher::RunSystemCommand(command);
  }

  // Show help for the current app
  void Gui::AboutProgram() {
    Isis::FileName file((QString)
                        "$ISISROOT/doc/Application/presentation/PrinterFriendly/" +
                        Isis::Application::GetUserInterface().ProgramName() +
                        "/" +
                        Isis::Application::GetUserInterface().ProgramName() +
                        ".html");

    Isis::PvlGroup &uig = Isis::Preference::Preferences().findGroup("UserInterface");
#if defined(__linux__)
    QString command = (QString) uig["GuiHelpBrowser"] +
                          (QString)" file:" + file.expanded() + " &";
                      " http://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/" +
                      Isis::Application::GetUserInterface().ProgramName() + "/" +
                      Isis::Application::GetUserInterface().ProgramName() + ".html";
#elif defined(__APPLE__)
    QString command = "open -a" + (QString) uig["GuiHelpBrowser"] +
                      " http://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/" +
                      Isis::Application::GetUserInterface().ProgramName() + "/" +
                      Isis::Application::GetUserInterface().ProgramName() + ".html";
#endif
    ProgramLauncher::RunSystemCommand(command);
  }

+56 −53
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
      total of 4 plotted DN values. <strong>Please note:</strong> For a line with a rounded length of
      <i>n</i>, the tool will calculate <i>n</i> + 1 values.
    </p>
    <!--
    <image src="assets/image/LinearSelection.png" height="400" />
    <image src="assets/image/LinearPlot.png" height="400" />
    <p>
@@ -48,8 +49,8 @@
      the DN values were calculated. The mouse was first clicked at dileneation marked "1" on the
      cube, and was released at "4". The number from the cube view correlates with the "Pixel
      Number" on the plot.
      
    </p>
    -->
    <h4>Rotated Rectangle</h4>
    <p>
      This mode of the Spatial Plot Tool involves drawing a
@@ -84,6 +85,7 @@
      value in the plot. The tool continues this pattern until it has reached the opposite edge of
      the rectangle as the first-drawn line.
    </p>
    <!--
    <image src="assets/image/RRSelection.png" height="400" />
    <image src="assets/image/RRSelectionMarked.png" height="400" />
    <image src="assets/image/RRPlot.png" height="400" />
@@ -96,6 +98,7 @@
      delineations 1-5, and this value is stored as "Pixel Value" 1 in the plot window, while the
      averages of 6-10 are stored in 2, and 7-15 are stored in 3.
    </p>
    -->
    <h4>Interpolations</h4>
    <p>
      Spatial Plot Tool makes use of Nearest Nieghbor, BiLinear and Cubic Convolution interpolations
+12 −10
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include "MainWindow.h"
#include "Workspace.h"
#include "Preference.h"
#include "ProgramLauncher.h"


namespace Isis {
@@ -60,17 +61,18 @@ namespace Isis {
   * @author  2007-06-12 Tracie Sucharski
   */
  void HelpTool::aboutProgram() {
    FileName file(
                  "$ISISROOT/doc/Application/presentation/PrinterFriendly/" +
                  QApplication::applicationName() + "/" +
                  QApplication::applicationName() + ".html");

    PvlGroup &uig = Preference::Preferences().findGroup("UserInterface");
#if defined(__linux__)
    QString command = (QString) uig["GuiHelpBrowser"] +
                      (QString)" file:" + file.expanded() + " &";
    if(system(command.toLatin1().data()) != 0) {
      IString msg = "Failed to execute [" + command + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
                      " http://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/" +
                      QApplication::applicationName() + "/" +
                      QApplication::applicationName() + ".html";
#elif defined(__APPLE__)
    QString command = "open -a" + (QString) uig["GuiHelpBrowser"] +
                      " http://isis.astrogeology.usgs.gov/Application/presentation/Tabbed/" +
                      QApplication::applicationName() + "/" +
                      QApplication::applicationName() + ".html";
#endif
    ProgramLauncher::RunSystemCommand(command);
  }
}