Builtin Graphical Components

Application

OpenAleaLab proposes classes to create generic “labs”. A lab is a graphical interfaces providing several features :

  • python shell: runs scripts
  • editors : view and edit scripts, workflow, ...
  • managers: manage packages, plugins and projects
  • viewer: displays a scene in 2d or 3d
  • scene: a generic representation of all data used in simulation
  • reporting: show logs, history, ...

Library also provides generic object to ease GUI creation like ribbon bars, mainwindow classes, but OpenAleaLab is not a generic application framework like Qt.

Extension

Generic graphical components

Paned menus

Paned menus, also called “ribbon bars” are alternatives to classical Tool bars. It allows to emphasize some action with larger buttons. To create a Paned menu, you just need to create a PanedMenu and add QAction with addBtnByAction() method :

PanedMenu components :

../../../_images/api_ribbon_bar.png

Main classes and methods

class openalea.oalab.gui.menu.PanedMenu(parent=None)[source]

A widget that tries to mimic menu of Microsoft Office 2010. Cf. Ribbon Bar.

>>> from openalea.oalab.gui.menu import PanedMenu
>>> menu = PanedMenu()
addBtnByAction(pane_name, group_name, action, btn_type=0)[source]
Parameters:
  • pane_name – name of pane. type:String.
  • group_name – name of group inside the pane. type:String.
  • action – to add (with a name and an icon)
  • btn_type – type of button to add. 0 = Big Button. 1 = Small Button, smallwidget = Small Widget, bigwidget = Big Widget. Default=0.
Returns:

created button. type:QToolButton