Class s.g.e.b.BaseRelationshipEditorSlave(GladeSlaveDelegate):

Part of stoqlib.gui.editors.baseeditor View In Hierarchy

Known subclasses: stoqlib.gui.editors.producteditor.ProductSupplierSlave

An editor for relationships between objects

BaseRelationshipEditor provides an easy way to edit (add/remove) relations between objects.

It doesn't allow creations of new objects, only linking between them. (the linking might require new objects, though)

For example, you could edit suppliers for a product (or produts supplied by an supplier).

Subclasses must implement get_targets, get_columns, get_relations, and create_model.

Method __init__ Undocumented
Method _setup_relations_list Undocumented
Method _setup_widgets Undocumented
Method get_targets Returns a list of valid taret objects.
Method get_columns Columns to display
Method get_relations Returns the already existing relations.
Method create_model This method should create the model when adding a new relationship.
Method add Undocumented
Method edit Undocumented
Method remove Undocumented
Method _run_editor Runs an editor for the relationship (if necessary).
Method on_add_button__clicked Undocumented
Method on_target_combo__content_changed Undocumented
Method _on_edit_item__clicked Undocumented
Method _on_remove_item__clicked Undocumented
def __init__(self, conn, parent=None):
Undocumented
def _setup_relations_list(self):
Undocumented
def _setup_widgets(self):
Undocumented
def get_targets(self):
Returns a list of valid taret objects.

for instance, if suppliers for a product are being edited, then this should return a list fo suppliers.

def get_columns(self):
Columns to display
def get_relations(self):
Returns the already existing relations.

This may be entries from a maping table or entries from the target table itself, depending on the type of relationship

def create_model(self):
This method should create the model when adding a new relationship.

If the addition is canceled. It will automatically be removed.

def add(self):
Undocumented
def edit(self, model):
Undocumented
def remove(self, model):
Undocumented
def _run_editor(self, model=None):
Runs an editor for the relationship (if necessary).

An editor may be necessary only if there is an mapping table and and extra information in this table.

def on_add_button__clicked(self, widget):
Undocumented
def on_target_combo__content_changed(self, widget):
Undocumented
def _on_edit_item__clicked(self, list, item):
Undocumented
def _on_remove_item__clicked(self, list, item):
Undocumented
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.