當前位置: 首頁>>代碼示例>>Python>>正文


Python searchdialog.SearchDialog類代碼示例

本文整理匯總了Python中stoqlib.gui.search.searchdialog.SearchDialog的典型用法代碼示例。如果您正苦於以下問題:Python SearchDialog類的具體用法?Python SearchDialog怎麽用?Python SearchDialog使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SearchDialog類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: row_activate

 def row_activate(self, obj):
     """See :class:`SearchDialog.row_activate`
     """
     if self.double_click_confirm:
         SearchDialog.row_activate(self, obj)
     elif self.accept_edit_data:
         self._edit(obj)
開發者ID:tmaxter,項目名稱:stoq,代碼行數:7,代碼來源:searcheditor.py

示例2: __init__

    def __init__(self, store, editor_class=None, interface=None,
                 search_spec=None, hide_footer=True,
                 title='', selection_mode=None,
                 hide_toolbar=False, double_click_confirm=False):
        """
        Create a new SearchEditor object.
        :param store:
        :param table:
        :param editor_class:
        :param interface: The interface which we need to apply to the objects in
          kiwi list to get adapter for the editor.
        :param search_spec:
        :param hide_footer:
        :param title:
        :param selection_mode:
        :param hide_toolbar:
        :param double_click_confirm: If double click a item in the list should
          automatically confirm. Double click confirms takes precedence over
          editor_class (ie, if double_click_confirmis is True, it will
          confirm the dialog, instead of opening the editor).
        """

        if selection_mode is None:
            selection_mode = gtk.SELECTION_BROWSE
        self.interface = interface
        self._read_only = False
        self._message_bar = None

        SearchDialog.__init__(self, store, search_spec,
                              hide_footer=hide_footer, title=title,
                              selection_mode=selection_mode,
                              double_click_confirm=double_click_confirm)

        self._setup_slaves()
        if hide_toolbar:
            self.accept_edit_data = False
            self._toolbar.get_toplevel().hide()
        else:
            if not (self.has_new_button or self.has_edit_button):
                raise ValueError("You must set hide_footer=False instead "
                                 "of disable these two attributes.")

            editor_class = editor_class or self.editor_class
            if not editor_class:
                raise ValueError('An editor_class argument is required')
            if not issubclass(editor_class, BaseEditor):
                raise TypeError("editor_class must be a BaseEditor subclass")
            self.editor_class = editor_class

            self.accept_edit_data = self.has_edit_button
            if not self.has_new_button:
                self.hide_new_button()
            if not self.has_edit_button:
                self.hide_edit_button()
        self._selected = None
        self.update_widgets()

        self.set_edit_button_sensitive(False)
        self.results.connect('selection-changed', self._on_selection_changed)
        self._check_permissions()
開發者ID:LeonamSilva,項目名稱:stoq,代碼行數:60,代碼來源:searcheditor.py

示例3: __init__

 def __init__(self, store):
     self._fields = self.get_fields(store)
     SearchDialog.__init__(self, store, hide_footer=False)
     self.set_ok_label(_('Save'))
     self.ok_button.set_sensitive(True)
     self.mass_editor = MassEditorWidget(store, self._fields, self.results)
     self.search.vbox.pack_start(self.mass_editor, False, False, 0)
     self.search.vbox.reorder_child(self.mass_editor, 1)
     self.mass_editor.show_all()
開發者ID:hackedbellini,項目名稱:stoq,代碼行數:9,代碼來源:masseditordialog.py

示例4: __init__

 def __init__(self, store):
     SearchDialog.__init__(self, store)
     self._setup_widgets()
開發者ID:hackedbellini,項目名稱:stoq,代碼行數:3,代碼來源:loansearch.py

示例5: __init__

 def __init__(self, store):
     SearchDialog.__init__(self, store)
     self.results.connect('selection-changed', self._on_selection_changed)
     self._setup_button_slave()
開發者ID:hackedbellini,項目名稱:stoq,代碼行數:4,代碼來源:paymentreceivingsearch.py

示例6: __init__

 def __init__(self, store, storable):
     self._storable = storable
     dialog_title = _("Stock of %s") % storable.product.description
     SearchDialog.__init__(self, store, title=dialog_title)
     self.search.refresh()
開發者ID:Joaldino,項目名稱:stoq,代碼行數:5,代碼來源:productsearch.py

示例7: __init__

 def __init__(self, store, client=None):
     """
     :param client: the client which salaries will be searched
     """
     self.client = client
     SearchDialog.__init__(self, store)
開發者ID:EasyDevSolutions,項目名稱:stoq,代碼行數:6,代碼來源:clientsalaryhistorysearch.py

示例8: __init__

 def __init__(self, store):
     SearchDialog.__init__(self, store, self.search_table,
                           title=self.title)
     self.set_details_button_sensitive(False)
     self.results.connect('selection-changed', self.on_selection_changed)
開發者ID:tmaxter,項目名稱:stoq,代碼行數:5,代碼來源:paymentsearch.py


注:本文中的stoqlib.gui.search.searchdialog.SearchDialog類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。