Ticket #6846 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Connect ? button to qt assistant

Reported by: Peter Peterson Owned by: Peter Peterson
Priority: major Milestone: Release 2.5
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description

The offline docs are progressing far enough to get them hooked into the help button for the algorithms. This requires two things to do:

  1. Create a singleton in MantidQt/API for HelpWindow.
  2. Have the '?' button launch that singleton pointing at the correct algorithm page.

Attachments

qtassistanterror.png (75.3 KB) - added by Roman Tolchenov 7 years ago.

Change History

comment:1 Changed 7 years ago by Peter Peterson

Much of the background on how to do this comes from a skype conversation with Martyn. Here are some of the salient comments so they don't get lost.

... they all follow the SingletonHolder pattern from C++ Design Patterns.

Take a look at API::InstrumentDataService

Essentially you define a class, i.e. InstrumentDataServiceImpl that is the actual 
implementation and then you "typedef 
Mantid::Kernel::SingletonHolder<InstrumentDataServiceImpl> InstrumentDataService"
SingletonHolder then has the .Instance() methods etc.

The main thing is that all of the constructors/destructors should be private and 
there are some magic lines for windows that are required

and

The singleton holder creates the instance the first time .Instance() is called 
and then registers a function on program shutdown (atexit) to delete the 
singleton

and

The AlgorithmSelector is in MantidQt as it's used elsewhere in the LiveData 
widgets. I suppose in theory if it were in MantidQt/API then it could be exposed 
to Python and started stand-alone from MantidPlot. So if that sounds useful I'd 
move it to MantidQt/API

comment:2 Changed 7 years ago by Peter Peterson

  • Status changed from new to accepted

comment:3 Changed 7 years ago by Peter Peterson

Re #6846. Moved WindowHelper to be in MantidQt/API

Changeset: 0d056ac0039998d75e978d621fb722f25e57e868

comment:4 Changed 7 years ago by Peter Peterson

Re #6846. Added namespace to HelpWindow.

Changeset: 8a11d860bd8bd05b4ae34a09a878a966c6f35091

comment:5 Changed 7 years ago by Peter Peterson

Re #6846. Changed HelpWindow to be a singleton.

Changeset: 4f47938840fe5f4c60da6f15b0b5cc888db07cef

comment:6 Changed 7 years ago by Peter Peterson

Re #6846. Moved the algorithm help to use qt assistant.

Changeset: 2606850c89541199c9b8a01ab14fdbb14d1a8d01

comment:7 Changed 7 years ago by Peter Peterson

Re #6846. Removing unimplemented methods to help windows linking.

Changeset: c2381f689c82e0e32b07e5e4697c585d73952b04

comment:8 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 3e55236395faea04533887ebf963ea43780da9d6

comment:9 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:10 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:11 Changed 7 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

This is on feature/6846_qtassistant_singleton.

To test it, bring up an algorithm and click on the help button.

comment:12 Changed 7 years ago by Roman Tolchenov

  • Status changed from verify to verifying
  • Tester set to Roman Tolchenov

comment:13 Changed 7 years ago by Roman Tolchenov

  • Status changed from verifying to reopened
  • Resolution fixed deleted

There are two problems:

  1. assistant.exe isn't copied to bin/Release|Debug, which can be fixed by changing ${THIRD_PARTY} to ${CMAKE_LIBRARY_PATH} and adding ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/assistant.exe to DEPENDS at line 101.
  2. Error message from qt assistant (see attachment).

Changed 7 years ago by Roman Tolchenov

comment:14 Changed 7 years ago by Peter Peterson

  • Status changed from reopened to accepted

comment:15 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:16 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:17 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:18 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:19 Changed 7 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:20 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester changed from Roman Tolchenov to Martyn Gigg

comment:21 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:22 Changed 7 years ago by Martyn Gigg

Looks good apart from the LoadDialog. That has some custom handling of the the helpClicked slot so needs altering too. Other CustomDialogs seem okay.

comment:23 Changed 7 years ago by Peter Peterson

  • Status changed from reopened to accepted

comment:24 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:25 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:26 Changed 7 years ago by Peter Peterson

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:27 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:28 Changed 7 years ago by Peter Peterson

Re #6846. Moved WindowHelper to be in MantidQt/API

Changeset: 0d056ac0039998d75e978d621fb722f25e57e868

comment:29 Changed 7 years ago by Peter Peterson

Re #6846. Added namespace to HelpWindow.

Changeset: 8a11d860bd8bd05b4ae34a09a878a966c6f35091

comment:30 Changed 7 years ago by Peter Peterson

Re #6846. Changed HelpWindow to be a singleton.

Changeset: 4f47938840fe5f4c60da6f15b0b5cc888db07cef

comment:31 Changed 7 years ago by Peter Peterson

Re #6846. Moved the algorithm help to use qt assistant.

Changeset: 2606850c89541199c9b8a01ab14fdbb14d1a8d01

comment:32 Changed 7 years ago by Peter Peterson

Re #6846. Removing unimplemented methods to help windows linking.

Changeset: c2381f689c82e0e32b07e5e4697c585d73952b04

comment:33 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 3e55236395faea04533887ebf963ea43780da9d6

comment:34 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:35 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:36 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:37 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:38 Changed 7 years ago by Martyn Gigg

Tested the installer and the help buttons do the right thing.

comment:39 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

comment:40 Changed 7 years ago by Peter Peterson

Re #6846. Moved WindowHelper to be in MantidQt/API

Changeset: 0d056ac0039998d75e978d621fb722f25e57e868

comment:41 Changed 7 years ago by Peter Peterson

Re #6846. Added namespace to HelpWindow.

Changeset: 8a11d860bd8bd05b4ae34a09a878a966c6f35091

comment:42 Changed 7 years ago by Peter Peterson

Re #6846. Changed HelpWindow to be a singleton.

Changeset: 4f47938840fe5f4c60da6f15b0b5cc888db07cef

comment:43 Changed 7 years ago by Peter Peterson

Re #6846. Moved the algorithm help to use qt assistant.

Changeset: 2606850c89541199c9b8a01ab14fdbb14d1a8d01

comment:44 Changed 7 years ago by Peter Peterson

Re #6846. Removing unimplemented methods to help windows linking.

Changeset: c2381f689c82e0e32b07e5e4697c585d73952b04

comment:45 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 3e55236395faea04533887ebf963ea43780da9d6

comment:46 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:47 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:48 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:49 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:50 Changed 7 years ago by Peter Peterson

Re #6846. Moved WindowHelper to be in MantidQt/API

Changeset: 0d056ac0039998d75e978d621fb722f25e57e868

comment:51 Changed 7 years ago by Peter Peterson

Re #6846. Added namespace to HelpWindow.

Changeset: 8a11d860bd8bd05b4ae34a09a878a966c6f35091

comment:52 Changed 7 years ago by Peter Peterson

Re #6846. Changed HelpWindow to be a singleton.

Changeset: 4f47938840fe5f4c60da6f15b0b5cc888db07cef

comment:53 Changed 7 years ago by Peter Peterson

Re #6846. Moved the algorithm help to use qt assistant.

Changeset: 2606850c89541199c9b8a01ab14fdbb14d1a8d01

comment:54 Changed 7 years ago by Peter Peterson

Re #6846. Removing unimplemented methods to help windows linking.

Changeset: c2381f689c82e0e32b07e5e4697c585d73952b04

comment:55 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 3e55236395faea04533887ebf963ea43780da9d6

comment:56 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:57 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:58 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:59 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:60 Changed 7 years ago by Peter Peterson

Re #6846. Moved WindowHelper to be in MantidQt/API

Changeset: 0d056ac0039998d75e978d621fb722f25e57e868

comment:61 Changed 7 years ago by Peter Peterson

Re #6846. Added namespace to HelpWindow.

Changeset: 8a11d860bd8bd05b4ae34a09a878a966c6f35091

comment:62 Changed 7 years ago by Peter Peterson

Re #6846. Changed HelpWindow to be a singleton.

Changeset: 4f47938840fe5f4c60da6f15b0b5cc888db07cef

comment:63 Changed 7 years ago by Peter Peterson

Re #6846. Moved the algorithm help to use qt assistant.

Changeset: 2606850c89541199c9b8a01ab14fdbb14d1a8d01

comment:64 Changed 7 years ago by Peter Peterson

Re #6846. Removing unimplemented methods to help windows linking.

Changeset: c2381f689c82e0e32b07e5e4697c585d73952b04

comment:65 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 3e55236395faea04533887ebf963ea43780da9d6

comment:66 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:67 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:68 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:69 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:70 Changed 7 years ago by Peter Peterson

Re #6846. Moved WindowHelper to be in MantidQt/API

Changeset: 0d056ac0039998d75e978d621fb722f25e57e868

comment:71 Changed 7 years ago by Peter Peterson

Re #6846. Added namespace to HelpWindow.

Changeset: 8a11d860bd8bd05b4ae34a09a878a966c6f35091

comment:72 Changed 7 years ago by Peter Peterson

Re #6846. Changed HelpWindow to be a singleton.

Changeset: 4f47938840fe5f4c60da6f15b0b5cc888db07cef

comment:73 Changed 7 years ago by Peter Peterson

Re #6846. Moved the algorithm help to use qt assistant.

Changeset: 2606850c89541199c9b8a01ab14fdbb14d1a8d01

comment:74 Changed 7 years ago by Peter Peterson

Re #6846. Removing unimplemented methods to help windows linking.

Changeset: c2381f689c82e0e32b07e5e4697c585d73952b04

comment:75 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 3e55236395faea04533887ebf963ea43780da9d6

comment:76 Changed 7 years ago by Peter Peterson

Re #6846. Trying to fix the windoze builds.

Changeset: 9133698955bac9ec5f16af472f6882c17b4206d2

comment:77 Changed 7 years ago by Peter Peterson

Re #6846. Adding more logging and searching for windoze assistant.exe.

Changeset: 656d0e65d1165c2889f9acfaa244b7778a1e7d7f

comment:78 Changed 7 years ago by Peter Peterson

Re #6846. Fixing messed up ifdef.

Changeset: 22faef30edc12f3f37de4c267ab5867d58aae31c

comment:79 Changed 7 years ago by Peter Peterson

Re #6846. Fixed bug in Load help button and HelpWindow method.

Changeset: 9a8f929b3568d313e5b618cc98125f903a416279

comment:80 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7692

Note: See TracTickets for help on using tickets.