octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

using uimenu objects to provide Qt figure window menus


From: John W. Eaton
Subject: using uimenu objects to provide Qt figure window menus
Date: Wed, 12 Sep 2018 16:20:47 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Some time ago when I asked about deprecating the fltk plotting widget, one of the reasons given to delay doing that was that the qt widget does not use uimenu objects for the figure menus. I'd like to fix that but would like to have some input from others first.

I see that if I comment out the lines

  ## Only FLTK toolkit currently provides menubar
  if (! strcmp (get (fig, "__graphics_toolkit__"), "fltk"))
    return;
  endif

in scripts/plot/util/private/__add_default_menu__.m, then additional "file" and "edit" menus are added to the figure menubar. These are the same as the ones use for the fltk figure window and the actions appear to work. So I think the comment about only the fltk toolkit providing a menubar is not correct. Then it seems that the simplest fix would be to eliminate the built-in menus from the qt widget and enable these menu items instead. But then we would lose the "help" menu from the qt widget, and the items in the "edit" menu are not the same in the qt and fltk widgets, and the qt "edit" menu has icons that are not present in the fltk widget.

It would be easy enough to add a help menu for both the qt and fltk plotting widgets.

What should we do about the items in the "edit" menu? I guess it makes sense to merge all items so the the qt and fltk widgets have the same set.

What about icons in the uimenu items? There seems to be no standard Matlab way to do that. Should we add a new "__icon__" property? Or just use the "userdata" property for the icon name?

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]