Class s.g.e.b.BaseEditor(BaseEditorSlave):

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

Known subclasses: stoqlib.gui.dialogs.clientdetails.ClientDetailsDialog, stoqlib.gui.dialogs.csvexporterdialog.CSVExporterDialog, stoqlib.gui.dialogs.initialstockdialog.InitialStockDialog, stoqlib.gui.dialogs.openinventorydialog.OpenInventoryDialog, stoqlib.gui.dialogs.paymentadditiondialog.BasePaymentAddition, stoqlib.gui.dialogs.paymentadditiondialog.LonelyPaymentDetailsDialog, stoqlib.gui.dialogs.paymentchangedialog.BasePaymentChangeDialog, stoqlib.gui.dialogs.productadjustmentdialog.AdjustmentDialog, stoqlib.gui.dialogs.productadjustmentdialog.ProductsAdjustmentDialog, stoqlib.gui.dialogs.productcountingdialog.ProductCountingDialog, stoqlib.gui.dialogs.productretention.ProductRetentionDialog, stoqlib.gui.dialogs.productstockdetails.ProductStockHistoryDialog, stoqlib.gui.dialogs.purchasedetails.PurchaseDetailsDialog, stoqlib.gui.dialogs.quotedialog.QuoteFillingDialog, stoqlib.gui.dialogs.receivingdialog.ReceivingOrderDetailsDialog, stoqlib.gui.dialogs.renegotiationdetails.RenegotiationDetailsDialog, stoqlib.gui.dialogs.saledetails.SaleDetailsDialog, stoqlib.gui.dialogs.saledetails.SaleReturnDetailsDialog, stoqlib.gui.dialogs.supplierdetails.SupplierDetailsDialog, stoqlib.gui.dialogs.transferorderdialog.TransferOrderDetailsDialog, stoqlib.gui.editors.addresseditor.AddressEditor, stoqlib.gui.editors.categoryeditor.BaseSellableCategoryEditor, stoqlib.gui.editors.categoryeditor.SellableCategoryEditor, stoqlib.gui.editors.contacteditor.ContactEditor, stoqlib.gui.editors.deviceseditor.DeviceSettingsEditor, stoqlib.gui.editors.fiscaleditor.CfopEditor, stoqlib.gui.editors.fiscaleditor.FiscalBookEntryEditor, stoqlib.gui.editors.invoiceeditor.InvoiceLayoutEditor, stoqlib.gui.editors.invoiceeditor.InvoicePrinterEditor, stoqlib.gui.editors.invoiceeditor.SaleInvoicePrinterDialog, stoqlib.gui.editors.noteeditor.NoteEditor, stoqlib.gui.editors.parameterseditor.SystemParameterEditor, stoqlib.gui.editors.paymentcategoryeditor.PaymentCategoryEditor, stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor, stoqlib.gui.editors.producteditor.ProductComponentEditor, stoqlib.gui.editors.producteditor.ProductStockEditor, stoqlib.gui.editors.producteditor.ProductSupplierEditor, stoqlib.gui.editors.profileeditor.UserProfileEditor, stoqlib.gui.editors.purchaseeditor.PurchaseItemEditor, stoqlib.gui.editors.receivingeditor.ReceivingItemEditor, stoqlib.gui.editors.saleeditor.SaleQuoteItemEditor, stoqlib.gui.editors.sellableeditor.SellableEditor, stoqlib.gui.editors.sellableeditor.SellablePriceEditor, stoqlib.gui.editors.sellableeditor.SellableTaxConstantEditor, stoqlib.gui.editors.serviceeditor.ServiceItemEditor, stoqlib.gui.editors.simpleeditor.SimpleEntryEditor, stoqlib.gui.editors.stationeditor.StationEditor, stoqlib.gui.editors.tilleditor.CashAdvanceEditor, stoqlib.gui.editors.tilleditor.CashInEditor, stoqlib.gui.editors.tilleditor.CashOutEditor, stoqlib.gui.editors.tilleditor.TillClosingEditor, stoqlib.gui.editors.tilleditor.TillOpeningEditor, stoqlib.gui.search.parametersearch.ParameterSearch, stoqlib.gui.slaves.installmentslave._InstallmentConfirmationSlave, stoqlib.gui.slaves.paymentslave._MultipleMethodEditor, stoqlib.gui.slaves.userslave.PasswordEditor, stoqlib.gui.templates.persontemplate.BasePersonRoleEditor

Base class for editor dialogs. It offers methods of BaseEditorSlave, a windows title and OK/Cancel buttons.
Class Variablesmodel_namethe model type name of the model we are editing. This value will be showed in the title of the editor and can not be merely the attribute __name__ of the object for usability reasons. Call sites will decide what could be the best name applicable in each situation.
Method __init__ A base class for editor slaves inheritance
Method _get_title_format Undocumented
Method get_title Undocumented
Method enable_window_controls Enables the window controls
Method set_description Sets the description of the model object which is used by the editor
Method refresh_ok Refreshes ok button sensitivity according to widget validators
Method add_button Adds a button to editor. The added button is returned which you
Method cancel Cancel the dialog.
Method confirm Confirm the dialog.
Method enable_ok Enable the ok button of the dialog, eg makes it possible
Method enable_normal_window Enable the dialog as a normal window.
Method set_confirm_widget Make a widget confirmable, eg activating that widget would

Inherited from BaseEditorSlave:

Method _setup_visual_mode Undocumented
Method create_model Creates a new model for the editor.
Method setup_proxies A subclass can override this
Method setup_slaves A subclass can override this
Method on_cancel This is a hook method which must be redefined when some
Method on_confirm This is a hook method which must be redefined when some
Method update_visual_mode This method must be overwritten on child if some addition task in
Method validate_confirm Must be redefined by childs and will perform some validations
def __init__(self, conn, model=None, visual_mode=False):
overridden in stoqlib.gui.dialogs.clientdetails.ClientDetailsDialog, stoqlib.gui.dialogs.csvexporterdialog.CSVExporterDialog, stoqlib.gui.dialogs.initialstockdialog.InitialStockDialog, stoqlib.gui.dialogs.openinventorydialog.OpenInventoryDialog, stoqlib.gui.dialogs.paymentadditiondialog.BasePaymentAddition, stoqlib.gui.dialogs.paymentadditiondialog.LonelyPaymentDetailsDialog, stoqlib.gui.dialogs.paymentchangedialog.BasePaymentChangeDialog, stoqlib.gui.dialogs.productadjustmentdialog.AdjustmentDialog, stoqlib.gui.dialogs.productadjustmentdialog.ProductsAdjustmentDialog, stoqlib.gui.dialogs.productcountingdialog.ProductCountingDialog, stoqlib.gui.dialogs.productretention.ProductRetentionDialog, stoqlib.gui.dialogs.productstockdetails.ProductStockHistoryDialog, stoqlib.gui.dialogs.quotedialog.QuoteFillingDialog, stoqlib.gui.dialogs.receivingdialog.ReceivingOrderDetailsDialog, stoqlib.gui.dialogs.saledetails.SaleDetailsDialog, stoqlib.gui.dialogs.supplierdetails.SupplierDetailsDialog, stoqlib.gui.dialogs.transferorderdialog.TransferOrderDetailsDialog, stoqlib.gui.editors.addresseditor.AddressEditor, stoqlib.gui.editors.categoryeditor.BaseSellableCategoryEditor, stoqlib.gui.editors.categoryeditor.SellableCategoryEditor, stoqlib.gui.editors.contacteditor.ContactEditor, stoqlib.gui.editors.deviceseditor.DeviceSettingsEditor, stoqlib.gui.editors.fiscaleditor.CfopEditor, stoqlib.gui.editors.invoiceeditor.InvoiceLayoutEditor, stoqlib.gui.editors.invoiceeditor.SaleInvoicePrinterDialog, stoqlib.gui.editors.noteeditor.NoteEditor, stoqlib.gui.editors.parameterseditor.SystemParameterEditor, stoqlib.gui.editors.paymentmethodeditor.PaymentMethodEditor, stoqlib.gui.editors.producteditor.ProductComponentEditor, stoqlib.gui.editors.profileeditor.UserProfileEditor, stoqlib.gui.editors.purchaseeditor.PurchaseItemEditor, stoqlib.gui.editors.saleeditor.SaleQuoteItemEditor, stoqlib.gui.editors.sellableeditor.SellableEditor, stoqlib.gui.editors.sellableeditor.SellableTaxConstantEditor, stoqlib.gui.editors.serviceeditor.ServiceItemEditor, stoqlib.gui.editors.simpleeditor.SimpleEntryEditor, stoqlib.gui.editors.stationeditor.StationEditor, stoqlib.gui.editors.tilleditor.CashInEditor, stoqlib.gui.editors.tilleditor.CashOutEditor, stoqlib.gui.editors.tilleditor.TillClosingEditor, stoqlib.gui.editors.tilleditor.TillOpeningEditor, stoqlib.gui.search.parametersearch.ParameterSearch, stoqlib.gui.slaves.installmentslave._InstallmentConfirmationSlave, stoqlib.gui.slaves.paymentslave._MultipleMethodEditor, stoqlib.gui.slaves.userslave.PasswordEditor, stoqlib.gui.templates.persontemplate.BasePersonRoleEditor
A base class for editor slaves inheritance
Parametersconna connection
modelthe object model tied with the proxy widgets
visual_modedoes this slave must be opened in visual mode? if so, all the proxy widgets will be disable
def _get_title_format(self):
Undocumented
def get_title(self, model):
Undocumented
def enable_window_controls(self):
Enables the window controls See kiwi.ui.views.BaseView.enable_window_controls.
def set_description(self, description):
Sets the description of the model object which is used by the editor
Parametersdescription
def refresh_ok(self, validation_value):
Refreshes ok button sensitivity according to widget validators status
def add_button(self, label=None, stock=None):
Adds a button to editor. The added button is returned which you can use to connect signals on.
Parameterslabellabel of the button
stockstock label of the button
returnsthe button added
Returns (type: gtk.Button )
def cancel(self):
Cancel the dialog.
def confirm(self):
Confirm the dialog.
def enable_ok(self):
Enable the ok button of the dialog, eg makes it possible to close/confirm the dialog.
def enable_normal_window(self):
Enable the dialog as a normal window. This tells the window manager that the window should behave as a normal window instead of a dialog.
def set_confirm_widget(self, widget_name):
Make a widget confirmable, eg activating that widget would close the dialog.
Parameterswidget_namename of the widget to be confirmable
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.