Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

Alignment of function boxes

This commit is contained in:
Arnar Flatberg 2007-02-27 18:14:58 +00:00
parent b754a5df44
commit 78183df0e9
1 changed files with 16 additions and 7 deletions

View File

@ -45,6 +45,7 @@ def workflow_list():
return retval
class Workflow:
"""Defines a workflow that contains a set of analysis stages.
@ -79,12 +80,14 @@ class Workflow:
logger.log('notice','Project added in : %s' %self.name)
self.project = project
class EmptyWorkflow(Workflow):
name = 'Empty Workflow'
def __init__(self, app):
Workflow.__init__(self, None)
class Stage:
"""A stage is a part of the data analysis process.
@ -115,13 +118,14 @@ class Function:
self.id = id
self.name = name
# ,ust return a Validation object
# just return a Validation object
def validate_input(input):
return Validation(True,"Validation Not Implemented")
def run(self):
pass
class Validation:
def __init__(self,result, reason):
self.succeeded = result
@ -139,10 +143,14 @@ class WorkflowView (gtk.VBox):
# Add stage in the process
for stage in wf.stages:
exp = gtk.Expander(stage.name)
btn_align = gtk.Alignment(xscale=0.9)
btn_align.set_padding(0,4,20,0)
btn_align.show()
btn_box = gtk.VBox()
btn_align.add(btn_box)
btn_box.show()
exp.add(btn_box)
exp.add(btn_align)
# Add functions in each stage
for fun in stage.functions:
btn = gtk.Button(fun.name)
@ -254,7 +262,7 @@ class OptionsDialog(gtk.Dialog):
self.nb = nb = gtk.Notebook()
# 1. page: input/output
#
#inputs
input_frame = gtk.Frame("Input")
hbox = gtk.HBox(True, 8)
@ -365,9 +373,9 @@ class OptionsDialog(gtk.Dialog):
self._options.update(options)
def set_output(self):
# get marked output data
# get toggled output data
out_data = [item[0] for name, mark, ic in self.dataset_list for item in self._options['all_data'] if mark==True and name==item[1]]
# get marked plots
# get toggled plots
out_plots = [item[0] for name, mark, ic in self.plot_list for item in self._options['all_plots'] if mark==True and name==item[1]]
# update options
self._options['out_data'] = out_data
@ -398,7 +406,7 @@ class OptionsDialog(gtk.Dialog):
try:
self.wTree = gtk.glade.XML(glade_file)
except:
logger.log('debug', 'Could not find glade file: %s' %glade_file)
logger.log('notice', 'Could not find glade file: %s' %glade_file)
widget = self.wTree.get_widget(widget_name)
win = widget.get_parent()
@ -407,6 +415,7 @@ class OptionsDialog(gtk.Dialog):
self.nb.insert_page(widget, gtk.Label(page_title), -1)
self.nb.set_current_page(0)
def toggled(renderer, path, store):
it = store.get_iter(path)
old_value = store.get_value(it, 1)