X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fscreens%2Fconfigscreen.py;fp=sface%2Fscreens%2Fconfigscreen.py;h=3c716ce08f90e88621b176487b4e361cf61819c3;hp=37db423899f1cba6e41ace739d835da8a7537bdc;hb=312ec1d8972acfdd51b2bc6c26ba7f89b6096303;hpb=3c68878ef4063449f4d3168558647f15a7f13b3b diff --git a/sface/screens/configscreen.py b/sface/screens/configscreen.py index 37db423..3c716ce 100644 --- a/sface/screens/configscreen.py +++ b/sface/screens/configscreen.py @@ -73,28 +73,29 @@ class ConfigWidget(QWidget): row += 1 hlayout = QHBoxLayout() - hlayout.addStretch() - def conf_button (action,label): + def bottom_button (action,label,align): button=QPushButton(label, self) button.setSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum) - hlayout.addWidget(button) + hlayout.addWidget(button,0,align) hlayout.addSpacing(10) self.connect(button, SIGNAL('clicked()'), getattr(self,action)) - conf_button ('load','Load Conf. Dir') + bottom_button ('load','Load Config Dir',Qt.AlignLeft) # the config dir edit dialog - edit=QLineEdit (config.get_dirname(),self) - self.store_local('config_dirname',edit) - edit.setAttribute(Qt.WA_MacShowFocusRect, 0) - edit.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Maximum) - self.connect(edit,SIGNAL ('returnPressed()'), self.load) - hlayout.addWidget (edit) + confdir=QLineEdit (config.get_dirname(),self) + self.store_local('config_dirname',confdir) + confdir.setAttribute(Qt.WA_MacShowFocusRect, 0) + confdir.setSizePolicy(QSizePolicy.Expanding,QSizePolicy.Maximum) + confdir.setStyleSheet("QLineEdit { width: 200px; }") + self.connect(confdir,SIGNAL ('returnPressed()'), self.load) + hlayout.addWidget (confdir,0,Qt.AlignLeft) hlayout.addSpacing(10) - conf_button ('createSlice', 'Create New Slice'), - conf_button ('apply','Apply Only'), - conf_button ('save','Apply && Save') + hlayout.addStretch() + bottom_button ('createSlice', 'Create New Slice', Qt.AlignRight), + bottom_button ('apply','Apply Only',Qt.AlignRight), + bottom_button ('save','Apply && Save',Qt.AlignRight) layout = QVBoxLayout() layout.addLayout(glayout) @@ -111,7 +112,6 @@ class ConfigWidget(QWidget): self.save() def apply(self): - print 'applying' for field in config.fields(): widget=getattr(self,field) if isinstance(widget,QCheckBox):