gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
72 stars 41 forks source link

Make global shortcuts either opt-out or configurable #9

Open osrf-migration opened 6 years ago

osrf-migration commented 6 years ago

Original report (archived issue) by Andrés Fortier (Bitbucket: andres_fortier).


After merging https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/43 and integrating it with another project, we realized that we may want to use those shortcuts for other actions in the app. After discussing a bit with @caguero and @nkoenig we concluded that it would be nice if either:

osrf-migration commented 6 years ago

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


I worry that creating a configuration for each shortcut could be hard to maintain. On the other hand, a blanket opt-out might not offer enough flexibility and downstream developers will end up having to re-implement all the shortcuts they want.

Another alternative I can think of is making the shortcuts easily overridable programatically.

Could you give more details about your use-case? For example:

  1. Will the app still have Ignition GUI's File menu? Or maybe it will keep some of its actions and hide others?
  2. If it keeps the menu, will it still want some of the current shortcuts?
  3. For the shortcuts it doesn't want, will it still have the action accessible thorugh the menu?
osrf-migration commented 6 years ago

Original comment by Andrés Fortier (Bitbucket: andres_fortier).


Thanks for looking at this @chapulina ! Those are great questions:

Will the app still have Ignition GUI's File menu? Or maybe it will keep some of its actions and hide others?

I expect either to see a bigger File menu (where Ignition GUI's actions are there but with different shortcuts) or a separate Layout menu with Ignition GUI's actions (again, using other shortcuts).

If it keeps the menu, will it still want some of the current shortcuts?

Yes, for the first case mentioned above, I envision e.g. Ctrl+O being used to load a model (e.g. an SDF).

For the shortcuts it doesn't want, will it still have the action accessible through the menu?

Yes

Since you recently worked on making the "Plugins" menu configurable, how do you feel about making all the UI menus configurable via the XML file (i.e. name, action and shortcut)? The only thing that I wouldn't know how to tackle here is the binding to an action, but maybe it is not that hard / there is a standard way of doing it? Just thinking out loud, but I think that would provide single solution across the board for all menus.