Ticket #10376 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Use menubar in Refl UI

Reported by: Harry Jeffery Owned by: Harry Jeffery
Priority: major Milestone: Release 3.3
Component: Reflectometry Keywords:
Cc: Blocked By: #10364
Blocking: #10237 Tester: Owen Arnold

Description

To prepare for creating an options menu for the Refl UI, we should first have a menu bar to launch the options menu from.

The goal of this ticket is to create a menu bar and populate it appropriately with relevant actions.

Attachments

Screen Shot 2014-10-21 at 10.08.01.png (130.4 KB) - added by Owen Arnold 6 years ago.
Screen Shot 2014-10-22 at 08.39.31.png (47.5 KB) - added by Owen Arnold 6 years ago.
Application menubar

Change History

comment:1 Changed 6 years ago by Harry Jeffery

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Harry Jeffery

  • Status changed from assigned to inprogress

comment:3 Changed 6 years ago by Harry Jeffery

Refs #10376 Assign icons to actions

Changeset: b1a1caebd6bdb0085e44d33d96a7d371b1b600b5

comment:4 Changed 6 years ago by Harry Jeffery

Refs #10376 Move New, Save, and Save As to menu bar

Changeset: 2d83e07f5f77d66a380830704f702cebac0c5358

comment:5 Changed 6 years ago by Harry Jeffery

Refs #10376 Change some PushButtons to ToolButtons

  • Add Row
  • Delete Row
  • Group Rows

Changeset: b62b3fc77084321230d2140868fd38043453203d

comment:6 Changed 6 years ago by Harry Jeffery

Refs #10376 Provide a menu for opening tables

This commit removes the workspace selector in favour of providing a proper menu for opening tables.

Changeset: 14c455ef659566a5702f71a768980f22f629bf39

comment:7 Changed 6 years ago by Harry Jeffery

Refs #10376 Update ReflMainViewPresenter unit test

  • Add expectations for setTableList
  • Remove unnecessary check points. setTableList was being called many times after a checkpoint (which had cleared expectations), causing many uninteresting calls to setTableList to issue warnings.

Changeset: acc0692f5f5971140e28cdc3d3c029e2a2f34991

comment:8 Changed 6 years ago by Harry Jeffery

Refs #10376 Reduce initial Refl UI size

Changeset: 87d91d85c133bff2d8d3b7083f818e35eef58332

comment:9 Changed 6 years ago by Harry Jeffery

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

comment:10 Changed 6 years ago by Harry Jeffery

Testing

  • Open the Refl UI
  • Play with the new menu bar
    • Verify all the menu actions work
    • Verify the add row, remove row, and group row tool buttons work
  • Verify unit tests are passing
  • Inspect code

comment:11 Changed 6 years ago by Owen Arnold

  • Status changed from verify to verifying
  • Tester set to Owen Arnold

Changed 6 years ago by Owen Arnold

comment:12 Changed 6 years ago by Owen Arnold

  • Status changed from verifying to reopened
  • Resolution fixed deleted

The Menu options are not appearing on OSX. Can you investigate why this might be please.

comment:13 Changed 6 years ago by Owen Arnold

  • Status changed from reopened to closed

Merge remote-tracking branch 'origin/feature/10376_refl_ui_menu_bar'

Full changeset: f2a383e23964f2b2cd30a35ebae45a41b8505bf1

comment:14 Changed 6 years ago by Owen Arnold

  • Status changed from closed to reopened

comment:15 Changed 6 years ago by Harry Jeffery

  • Status changed from reopened to inprogress

Refs #10376 Disable Refl UI native menu bar on OSX

Changeset: b16c6e6bd7f6724901776b34aa2e3f9d39dde666

Changed 6 years ago by Owen Arnold

Application menubar

comment:16 Changed 6 years ago by Owen Arnold

I've had some time to look at this issue. The last commit b16c6e6bd7f6724901776b34aa2e3f9d39dde666 enabled, the menu bars in the current window, but what we really need to achieve is use of the system menu bar because this is how most applications behave on OSX, including such tools as the SliceViewer.

http://qt-project.org/doc/qt-4.8/qmenubar.html suggests that this is down to the way that the menubar is constructed. So one route to try would be to follow the guidance in section QMenuBar on Mac OS X regarding the construction, and try assembling the menubar programatically.

Also:

  • Save Table is really an export as workspace feature, and should be labeled and iconed as such.
  • Open table did nothing
  • New Table did not prompt me to save an existing modified table before loading a new one.

comment:17 Changed 6 years ago by Harry Jeffery

THIS COMMIT HAS BEEN REMOVED

Refs #10376 Try creating menu bar programatically

Changeset: 4724bb6f97ddc2b6c3a37cce844d24d31216224d

Last edited 6 years ago by Harry Jeffery (previous) (diff)

comment:18 Changed 6 years ago by Harry Jeffery

THIS COMMIT HAS BEEN REMOVED

Refs #10376 Create menu bar parentlessly on OSX

Changeset: a871925e097a243d43eb6637add5328791f66736

Last edited 6 years ago by Harry Jeffery (previous) (diff)

comment:19 Changed 6 years ago by Owen Arnold

I haven't succeeded in getting this to work fully on OSX, and still strongly suspect that this comes down to the way that things are handled in USERSUBWINDOW. However, we can at least provide the menus, even if they end up on the window itself. The only thing left to do here is to call

menuBar->setNativeMenuBar(false); 

in

void QtReflMainView::initLayout()

and this should work sufficiently well in OSX.

comment:20 Changed 6 years ago by Harry Jeffery

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

comment:21 Changed 6 years ago by Harry Jeffery

Merge branch 'master' into feature/10376_refl_ui_menu_bar

Refs #10376

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/src/ReflMainViewPresenter.cpp

Changeset: dca08edccbba13ffb7fecc9bbed6e548e4cdae40

comment:22 Changed 6 years ago by Harry Jeffery

  • Status changed from verify to closed

Merge branch 'master' into feature/10376_refl_ui_menu_bar

Refs #10376

Conflicts:

Code/Mantid/MantidQt/CustomInterfaces/src/ReflMainViewPresenter.cpp

Full changeset: dca08edccbba13ffb7fecc9bbed6e548e4cdae40

comment:23 Changed 6 years ago by Owen Arnold

Merge remote-tracking branch 'origin/feature/10376_refl_ui_menu_bar'

Full changeset: c7be7f68a707adacb4f02991db9c4cf262dd7175

comment:24 Changed 6 years ago by Harry Jeffery

Refs #10376 Try creating menu bar programatically

Changeset: 4724bb6f97ddc2b6c3a37cce844d24d31216224d

comment:25 Changed 6 years ago by Harry Jeffery

Refs #10376 Create menu bar parentlessly on OSX

Changeset: a871925e097a243d43eb6637add5328791f66736

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11218

Note: See TracTickets for help on using tickets.