Part of stoqlib.gui.base.search View In Hierarchy
Known subclasses: stoqlib.gui.search.categorysearch.SellableCategorySearch, stoqlib.gui.search.fiscalsearch.CfopSearch, stoqlib.gui.search.fiscalsearch.FiscalBookEntrySearch, stoqlib.gui.search.personsearch.BasePersonSearch, stoqlib.gui.search.personsearch.EmployeeRoleSearch, stoqlib.gui.search.productsearch.ProductSearch, stoqlib.gui.search.productsearch.ProductStockSearch, stoqlib.gui.search.profilesearch.UserProfileSearch, stoqlib.gui.search.purchasesearch.PurchasedItemsSearch, stoqlib.gui.search.sellablesearch.SellableSearch, stoqlib.gui.search.servicesearch.ServiceSearch, stoqlib.gui.search.stationsearch.StationSearch
Base class for a search "editor" dialog, that offers a 'new' and 'edit' button on the dialog footer. The 'new' and 'edit' buttons will call 'editor_class' sending as its parameters a new connection and the object to edit for 'edit' button.
This is also a subclass of SearchDialog and the same rules are required.
Simple example:
>>> class CarSearch(SearchEditor): ... title = _("Car Search") ... table = Car ... editor_class = CarEditor ... size = (465, 390) ... searchbar_result_strings = _("Car"), _("Cars") ... ... def get_columns(self): ... return [Column('brand', _('Brand'), data_type=str, width=90), ... Column('description', _('Description'), data_type=str, ... expand=True)]
This will create a new editor called CarSearch.
Method | __init__ | Create a new SearchEditor object. |
Method | _setup_slaves | Undocumented |
Method | set_edit_button_sensitive | Control sensitivity of button edit |
Method | update_widgets | Subclass can have an 'update_widgets', and this method will be |
Method | hide_edit_button | Undocumented |
Method | hide_new_button | Undocumented |
Method | update_edited_item | Update the edited item to its proper type and select it on the |
Method | run | Handles action to be performed when window is opened. Defaults to |
Method | run_dialog | Undocumented |
Method | run_editor | Undocumented |
Method | row_activate | See SearchDialog.row_activate |
Method | _edit | Undocumented |
Method | _on_toolbar__edit | Undocumented |
Method | _on_toolbar__new | Undocumented |
Method | get_searchlist_model | Undocumented |
Method | get_editor_model | This hook must be redefined on child when changing the type of |
Inherited from SearchDialog:
Method | _setup_search_table | Undocumented |
Method | _setup_selection_mode | Undocumented |
Method | _setup_search | Undocumented |
Method | _setup_details_slave | Undocumented |
Method | set_details_button_sensitive | Undocumented |
Method | set_print_button_sensitive | Undocumented |
Method | get_selection | Undocumented |
Method | confirm | Undocumented |
Method | cancel | Undocumented |
Method | set_table | Undocumented |
Method | set_searchbar_labels | Undocumented |
Method | set_searchbar_search_string | Undocumented |
Method | set_result_strings | Undocumented |
Method | set_text_field_columns | See SearchSlaveDelegate.set_text_field_columns |
Method | disable_search_entry | See SearchSlaveDelegate.disable_search_entry |
Method | add_filter | See SearchSlaveDelegate.add_filter |
Method | create_branch_filter | Undocumented |
Method | _on_results__cell_edited | Override this method on child when it's needed to perform some |
Method | _on_results__selection_changed | Undocumented |
Method | _on_results__row_activated | Undocumented |
Method | _has_rows | Undocumented |
Method | create_filters | Undocumented |
Method | setup_widgets | Undocumented |
Method | get_columns | Undocumented |
Inherited from BasicDialog (via SearchDialog):
Method | _initialize | Undocumented |
Method | setup_keyactions | Undocumented |
Method | hide_footer | Undocumented |
Method | enable_ok | Undocumented |
Method | disable_ok | Undocumented |
Method | set_ok_label | Undocumented |
Method | set_cancel_label | Undocumented |
Method | justify_label | Undocumented |
Method | set_confirm_widget | Enables widget as a confirm widget, the dialog will be closed as |
Method | set_cancel_widget | Enables widget as a cancel widget, the dialog will be closed as |
Method | add | Undocumented |
Method | action_area | Undocumented |
Method | on_ok_button__clicked | Undocumented |
Method | on_cancel_button__clicked | Undocumented |
Inherited from RunnableView (via SearchDialog, BasicDialog, AbstractDialog):
Method | close | Handles action to be performed when window is closed. |
Method | destroy | Undocumented |
Parameters | conn | |
table | ||
editor_class | ||
interface | The interface which we need to apply to the objects in kiwi list to get adapter for the editor. | |
search_table | ||
hide_footer | ||
title | ||
selection_mode | ||
hide_toolbar | ||
double_click_confirm | If double click a item in the list should automatically confirm |