def __init__(self, parent):
QWidget.__init__(self, parent)
- layout = QVBoxLayout()
+ glayout = QGridLayout()
+ row = 0
for (field,msg) in config.field_labels():
- # label
- layout.addWidget(QLabel(msg,self))
# edit : text or checkbox
default=config.field_default(field)
if isinstance(default,bool):
edit=QLineEdit(config.get(field), self)
edit.setAttribute(Qt.WA_MacShowFocusRect, 0)
setattr(self,field,edit)
- layout.addWidget (edit)
+
+ glayout.addWidget(QLabel(msg+":",self), row, 0)
+ glayout.addWidget(edit, row, 1)
+
+ row += 1
hlayout = QHBoxLayout()
hlayout.addStretch()
hlayout.addWidget(button, 0, Qt.AlignRight)
hlayout.addSpacing(10)
self.connect(button, SIGNAL('clicked()'), getattr(self,action))
+
+ layout = QVBoxLayout()
+ layout.addLayout(glayout)
layout.addLayout(hlayout)
+ layout.addStretch()
self.setLayout(layout)
self.parent().setStatus("<font color='green'>Settings loaded for current session</font>", timeout=5000)
config.display("after apply")
+ self.parent().signalAll('configurationChanged')
+
+
def save(self):
self.apply()
config.save_config()
widget = ConfigWidget(self)
self.init(widget, "Configure", "Configure the OneLab Federation GUI")
+