openalea.oalab.gui package

Submodules

openalea.oalab.gui.allwidgets module

class openalea.oalab.gui.allwidgets.AllWidgets(session)[source]

Bases: PyQt4.QtGui.QWidget

TODO: This class must be replaced by independent widgets !

connect_actions(widget, menu=None)[source]

Connect actions from ‘widget’ to ‘menu’

connect_all_actions()[source]

Connect actions of different widget to the menu

openalea.oalab.gui.app module

class openalea.oalab.gui.app.OALab(args, session=None)[source]

Bases: PyQt4.QtGui.QApplication

openalea.oalab.gui.app.show_splash_screen()[source]

Show a small splash screen to make people wait for OpenAleaLab to startup

openalea.oalab.gui.help module

class openalea.oalab.gui.help.HelpWidget(session=None, controller=None, parent=None)[source]

Bases: PyQt4.QtGui.QTextBrowser

Widget which permit to display informations/help. Usefull in visualea or LPy.

actions()[source]
mainMenu()[source]
Returns:Name of menu tab to automatically set current when current widget

begin current.

openOALabBugs()[source]
openOALabTasks()[source]
openWeb(url)[source]
openWebsiteOpenalea()[source]

openalea.oalab.gui.logger module

class openalea.oalab.gui.logger.Logger(session, controller, parent=None)[source]

Bases: openalea.visualea.logger.LoggerView

Widget to check the log. Cf. Visualea

import Logger widget_logger = Logger()

# Put the widget in an QApplication

from openalea.core import logger logger.debug(“my message”) logger.warning(“Can’t do that!”) logger.info(“John is in the kitchen”)

openalea.oalab.gui.mainwindow module

class openalea.oalab.gui.mainwindow.MainWindow(session, controller, parent=None, args=None)[source]

Bases: PyQt4.QtGui.QMainWindow

Main Window Class

changeExtension(extension=None)[source]

Change to a new extension.

Parameters:extension – can be “mini”, “3d”, “tissue”, “plant”
changeMenuTab(old, new)[source]

Set tab of ‘new’ current in the menu. This class is designed to be connected to focusChanged signal.

Parameters:
  • old – old widget. Not used.
  • new – current widget to check if we have to change menu
closeEvent(event)[source]
defaultSettings()[source]

Restore default settings (geometry and window state)

preferedSettings()[source]

Get prefered settings and restore them

readSettings()[source]

Read a setting file and restore registered settings (geometry and window state)

registerPreferedSettings()[source]

Register current settings as preferd settings

removeDocksWidgets()[source]
setSelectLabInMenu()[source]
setSettingsInMenu()[source]
setShowDockInMenu()[source]

Use it to add show/hide dockwidget in menu

setWidgets(controller)[source]
writeSettings()[source]

Register current settings (geometry and window state) in a setting file

openalea.oalab.gui.menu module

Full example:

from openalea.vpltk.qt import QtGui
from openalea.oalab.gui.menu import PanedMenu

# Create ribbon bar
menu = PanedMenu()

# Create Qt QAction
act1 = QtGui.QAction(u'act 1', menu)
act2 = QtGui.QAction(u'act 2', menu)

# Add actions to ribbon bar
menu.addBtnByAction('Panel', 'group', act1, PanedMenu.BigButton)
menu.addBtnByAction('Panel', 'group', act2, PanedMenu.SmallButton)
class openalea.oalab.gui.menu.BigToolButton(action, icon=None)[source]

Bases: openalea.oalab.gui.menu.ToolButton

class openalea.oalab.gui.menu.Group(name)[source]

Bases: PyQt4.QtGui.QWidget

addBigBtn(name, icon)[source]
addBigToolButton(action)[source]
addBtnByAction(action, style=0)[source]
addSmallBtn(name, icon)[source]
addSmallToolButton(action)[source]
addWidget(widget, style='big')[source]

Permit to add small widget like if it was a small button

check_unicity_box(layout, name)[source]

Hide old button if a new is added with the same name Works with hbox and vbox layout

check_unicity_group(layout, name)[source]

Hide old button if a new is added with the same name. Works with groupLayout

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

Bases: PyQt4.QtGui.QWidget

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

Bases: PyQt4.QtGui.QTabWidget

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

>>> from openalea.oalab.gui.menu import PanedMenu
>>> menu = PanedMenu()
BigButton = 0
BigWidget = 'bigwidget'
SmallButton = 1
SmallWidget = 'smallwidget'
addBtn(pane_name, group_name, btn_name, btn_icon, btn_type=0)[source]
Parameters:
  • pane_name – name of pane. type:String.
  • group_name – name of group inside the pane. type:String.
  • btn_name – name of button inside the group. type:String.
  • btn_icon – icon of button. type:QtGui.QIcon.
  • 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

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

addBtns(pane_names, group_names, btn_names, btn_icons, btn_types)[source]
addSpecialTab(label, widget=None)[source]
showPane(pane_name)[source]
class openalea.oalab.gui.menu.SmallToolButton(action, icon=None)[source]

Bases: openalea.oalab.gui.menu.ToolButton

class openalea.oalab.gui.menu.SubGroupGrid[source]

Bases: PyQt4.QtGui.QWidget

class openalea.oalab.gui.menu.SubGroupH[source]

Bases: PyQt4.QtGui.QWidget

class openalea.oalab.gui.menu.SubGroupV[source]

Bases: PyQt4.QtGui.QWidget

class openalea.oalab.gui.menu.ToolButton(action, icon=None)[source]

Bases: PyQt4.QtGui.QToolButton

openalea.oalab.gui.pages module

class openalea.oalab.gui.pages.CreateFilePage(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

Welcome page in the applet container. Permit to open an existing project, or to create a new one, or to work on src outside projects.

class openalea.oalab.gui.pages.WelcomePage(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

Welcome page in the applet container. Permit to open an existing project, or to create a new one, or to work on src outside projects.

new()[source]
newScript()[source]
open()[source]
restoreSession()[source]
class openalea.oalab.gui.pages.SelectExtensionPage(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

Welcome page in the applet container. Permit to select the extension to work with.

UNUSED today

lab3d()[source]
mini()[source]
plant()[source]
tissue()[source]

openalea.oalab.gui.store module

class openalea.oalab.gui.store.Store(session, controller, parent=None)[source]

Bases: openalea.deploygui.alea_install_gui.MainWindow

This class is used to search, install and upgrade packages.

Warning!!! Will kill OALab!!!

actions()[source]
Returns:list of actions to set in the menu.
mainMenu()[source]
Returns:Name of menu tab to automatically set current when current widget

begin current.

Module contents