コード例 #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
                })