当前位置: 首页>>代码示例>>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;未经允许,请勿转载。