예제 #1
0
파일: search.py 프로젝트: arielvb/collector
 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
예제 #2
0
파일: search.py 프로젝트: arielvb/collector
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
                })