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 - 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
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
openalea.oalab.project.preview module¶
openalea.oalab.project.symlink module¶
- openalea.oalab.project.symlink.create_project_shortcut()[source]¶
Create a shortcut/symlink inside project directory to oalab.share directory. Permit to access to oalab examples simpler.
- openalea.oalab.project.symlink.symlink(source, link_name)[source]¶
os.symlink but with windows support.
Come from: http://stackoverflow.com/questions/6260149/os-symlink-support-in-windows
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_()
- 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()
- class openalea.oalab.project.treeview.ProjectLabel(session, controller, parent=None)[source]¶
Bases: PyQt4.QtGui.QLabel
Widget to display the name of the current project.
- 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
- class openalea.oalab.project.treeview.ProjectTreeView(session, controller, parent=None)[source]¶
Bases: PyQt4.QtGui.QTreeView
Widget to display Tree View of project.
- hasSelection()[source]¶
function hasSelection: check if an object is selected, return True in this case