openalea.oalab.project package

Submodules

openalea.oalab.project.manager module

class openalea.oalab.project.manager.ProjectManagerWidget(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

Object which permit to manage projects.

Warning:this QWidget is not used like a widget but like the interface between GUI (buttons “newProj”, “newScript”,...)

and objects (project, control, ...)

TODO:Refactor it
actions()[source]
closeCurrent()[source]

Close current project.

connectParadigmContainer()[source]
defaultProj()[source]
editFile(filename=None, extension=None)[source]

Permit to edit a file which is outside project. And add link to file in project.

importFile(filename=None, extension=None)[source]

Import a file and add it to the project.

Parameters:
  • filename – name of file to add in project
  • extension
new()[source]

Create an default empty project with a default name.

Open a window to define metadata of the project.

newModel(applet_type=None, tab_name=None, script='')[source]

Create a new model of type ‘applet_type

Parameters:applet_type – type of applet to add. Can be Workflow, LSystem, Python, R
open(name=False, project_path=None)[source]

If name==false, display a widget to choose project to open. Then open project.

openModel(fname=None, extension='*.*')[source]

” Open a (script-type) file named “fname”. If “fname”==None, display a dialog with filter “extension”.

Parameters:
  • fname – filename to open. Default = None
  • extension – extension of file to open. Default = “.
openProject(project)[source]

Open a project in application from project

Parameters:project – project from vpltk
removeModel(model_name)[source]
Parameters:model_name – Name of the model to remove in the current project
renameCurrent(new_name=None)[source]

Rename current project.

saveAs()[source]

Save current project but permit to rename and move it..

saveCurrent()[source]

Save current project.

update_from_widgets()[source]
openalea.oalab.project.manager.showNewProjectDialog(default_name=None, text=None, parent=None)[source]
openalea.oalab.project.manager.showOpenFileDialog(extension=None, where=None, parent=None)[source]
openalea.oalab.project.manager.showOpenProjectDialog(parent=None)[source]

openalea.oalab.project.pretty_preview module

class openalea.oalab.project.pretty_preview.PrettyPreview(project, size=200, parent=None)[source]

Bases: PyQt4.QtGui.QPushButton

PushButton initialized from a project : gets its name, icon and version and displays it.

class openalea.oalab.project.pretty_preview.ProjectSelector(projects, open_project=None, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

add_path_to_search_project()[source]
init()[source]
refersh_project_list()[source]
showDetails()[source]
showOpenProjectDialog()[source]
class openalea.oalab.project.pretty_preview.ProjectSelectorScroll(projects, open_project=None, parent=None)[source]

Bases: PyQt4.QtGui.QScrollArea

openalea.oalab.project.pretty_preview.main()[source]

openalea.oalab.project.preview module

class openalea.oalab.project.preview.Preview(project, open_project=None, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

on_project_opened()[source]
openalea.oalab.project.preview.main()[source]
openalea.oalab.project.preview.pretty_print(obj)[source]
Parameters:obj – to decode. Can be a string/unicode or a list of string/unicod
Returns:object decoded into utf-8.

openalea.oalab.project.treeview module

Display a tree view of the project in oalab

class openalea.oalab.project.treeview.PrjctManagerModel(project_manager, parent=None)[source]

Bases: PyQt4.QtGui.QStandardItemModel

Item model to use TreeView with the project manager.

Use:

from openalea.vpltk.project.manager import ProjectManager import sys app = QtGui.QApplication(sys.argv)

project_manager = ProjectManager() project_manager.discover()

# Model to transform a project into a tree proj_model = PrjctManagerModel(project_manager)

# Create tree view and set model treeView = QtGui.QTreeView() treeView.setModel(proj_model) treeView.expandAll()

# Display treeView.show() app.exec_()

set_proj_manag(project_manager)[source]
class openalea.oalab.project.treeview.PrjctModel(session, controller, project, parent=None)[source]

Bases: PyQt4.QtGui.QStandardItemModel

Item model to use TreeView with a project.

Use:

# Project to display project = ...

# Model to transform a project into a tree proj_model = PrjctModel(project)

# Create tree view and set model treeView = QtGui.QTreeView() treeView.setModel(proj_model)

# Display treeView.show()

renamed(x, y)[source]
set_proj(proj=None)[source]
class openalea.oalab.project.treeview.ProjectLabel(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QLabel

Widget to display the name of the current project.

update()[source]
class openalea.oalab.project.treeview.ProjectLayoutWidget(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

Widget to display the name of the current project AND the project

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

begin current.

update()[source]
class openalea.oalab.project.treeview.ProjectTreeView(session, controller, parent=None)[source]

Bases: PyQt4.QtGui.QTreeView

Widget to display Tree View of project.

create_menu()[source]
hasParent()[source]
hasSelection()[source]

function hasSelection: check if an object is selected, return True in this case

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

begin current.

reinit_treeview()[source]

Reinitialise project view

showMenu(event)[source]

function defining actions to do according to the menu’s button chosen

update()[source]
openalea.oalab.project.treeview.main()[source]

Module contents