Commit 1ad5c164 authored by payno's avatar payno

[orangecontrib][XASInput] move the start button to a default QDialog Ok button...

[orangecontrib][XASInput] move the start button to a default QDialog Ok button and hide the Widget when ok is activated
parent 233909f4
......@@ -84,8 +84,14 @@ class XASInputOW(OWWidget):
self._inputDialog = XASObjectDialog(parent=self)
self._inputWindow.layout().addWidget(self._inputDialog, 0, 0, 1, 2)
self._startPB = qt.QPushButton('restart', parent=self)
self._inputWindow.layout().addWidget(self._startPB, 1, 1, 1, 1)
style = qt.QApplication.instance().style()
icon = style.standardIcon(qt.QStyle.SP_DialogApplyButton)
# add the apply button
types = qt.QDialogButtonBox.Ok
self._buttons = qt.QDialogButtonBox(parent=self)
self._buttons.setStandardButtons(types)
self.layout().addWidget(self._buttons)
spacer = qt.QWidget(parent=self)
spacer.setSizePolicy(qt.QSizePolicy.Minimum, qt.QSizePolicy.Expanding)
......@@ -98,10 +104,11 @@ class XASInputOW(OWWidget):
self._manageSettings()
# expose api
self.restart = self._emitNewFile
self.apply = self._emitNewFile
# signal / slot connection
self._startPB.pressed.connect(self._emitNewFile)
self._buttons.accepted.connect(self.hide)
self._buttons.accepted.connect(self._emitNewFile)
self._inputDialog.editingFinished.connect(self._storeSettings)
self.setFileSelected = self._inputDialog.setDatFile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment