from sfa.util.version import version_core
from sface.version import version_dict
+from sface.sficreate import CreateWindow
+
static_labels = {
'slice' : [
"Sface : %s (%s)" % (version_dict()['code_tag'], version_dict()['code_url']),
glayout = QGridLayout()
row = 0
for (field,msg) in config.field_labels():
-
+
if static_labels.has_key(field):
labels=static_labels[field]
if not isinstance(labels,list): labels = [ labels, ]
hlayout.addWidget (edit)
hlayout.addSpacing(10)
+ conf_button ('createSlice', 'Create New Slice'),
conf_button ('apply','Apply Only'),
conf_button ('save','Apply && Save')
self.setLayout(layout)
self.inited=True
+ def createSlice(self):
+ dlg = CreateWindow(parent=self)
+ dlg.exec_()
+ if (dlg.sliceWasCreated):
+ self.slice.setText(dlg.getHrn())
+ self.save()
def apply(self):
print 'applying'
# switch to another config dir
def load(self):
# obtain new dor somehow
-
+
edit=self.retrieve_local('config_dirname')
newdir=str(edit.text())
newdir+='/'