def get_widget(self, params): dialog = QDialog(self.parent) self.dialog = Ui_Dialog_Search() # FIXME collection must be loaded from settings self.collection = 'boardgames' self.dialog.setupUi(dialog) return dialog
class SearchDialog(Dialog): """Quick Search dialog view""" dialog = None collection = None def get_widget(self, params): dialog = QDialog(self.parent) self.dialog = Ui_Dialog_Search() # FIXME collection must be loaded from settings self.collection = 'boardgames' self.dialog.setupUi(dialog) return dialog def after_exec(self, widget): result = widget.result() if result == 1: # Accepted self.parent.display_view( 'search', { 'term': self.dialog.lineEdit.text().toUtf8(), 'collection': self.collection })