def openBrowser(self): browser = TabbedBrowserDialog.buildForSession(self.spec, self.context) browser.setWindowTitle(FnAssetAPI.l("Publish to")) browser.setAcceptButtonTitle("Set") if not browser.exec_(): return '' self.targetTask = browser.getSelection()[0] obj = connector.Connector.objectById(self.targetTask) self._lineEdit.setText(HelpFunctions.getPath(obj, slash=True))
def makeUI(self): self.mainWidget = QtWidgets.QWidget() applyTheme(self.mainWidget, 'integration') self.mainWidget.setContentsMargins(0, 0, 0, 0) self.hlayout = QtWidgets.QHBoxLayout() self.hlayout.setContentsMargins(0, 0, 0, 0) self.mainWidget.setLayout(self.hlayout) self._lineEdit = QtWidgets.QLineEdit() self._lineEdit.setText( HelpFunctions.getPath(self.current_task, slash=True)) self.hlayout.addWidget(self._lineEdit) self._browse = QtWidgets.QPushButton("Browse") self.hlayout.addWidget(self._browse) QtCore.QObject.connect(self._browse, QtCore.SIGNAL('clicked()'), self.openBrowser) return self.mainWidget