本文整理汇总了Python中stoqlib.gui.base.lists.ModelListSlave类的典型用法代码示例。如果您正苦于以下问题:Python ModelListSlave类的具体用法?Python ModelListSlave怎么用?Python ModelListSlave使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ModelListSlave类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, parent, store, product,
visual_mode=False, reuse_store=True):
self._product = product
ModelListSlave.__init__(self, parent, store=store,
reuse_store=reuse_store)
if visual_mode:
self.set_list_type(ListType.READONLY)
self.refresh()
示例2: remove_item
def remove_item(self, item):
# If the test was used before in a production, it cannot be
# removed
if not item.can_remove():
warning(_(u'You can not remove this test, since it\'s already '
'been used.'))
return False
return ModelListSlave.remove_item(self, item)
示例3: __init__
def __init__(self, *args, **kwargs):
ModelListSlave.__init__(self, *args, **kwargs)
self.set_list_type(ListType.UNREMOVABLE)
示例4: __init__
def __init__(self, client, parent, store):
self._client = client
ModelListSlave.__init__(self, parent, store)
self.set_list_type(ListType.UNREMOVABLE)
示例5: __init__
def __init__(self, store, device, reuse_store=False):
self.device = device
ModelListSlave.__init__(self, store=store, reuse_store=reuse_store)
示例6: edit_item
def edit_item(self, item):
if item.brand == 'virtual':
info(_("Cant edit a virtual printer"))
return False
return ModelListSlave.edit_item(self, item)
示例7: __init__
def __init__(self, parent, store, reuse_store=False):
ModelListSlave.__init__(self, parent, store, reuse_store=reuse_store)
self.set_list_type(ListType.UNREMOVABLE)
示例8: __init__
def __init__(self, store, attribute):
self._attribute = attribute
ModelListSlave.__init__(self, store=store, reuse_store=True)
示例9: __init__
def __init__(self, *args, **kwargs):
ModelListSlave.__init__(self, *args, **kwargs)
self.set_list_type(ListType.ADDONLY)
示例10: __init__
def __init__(self, store, device):
self.device = device
ModelListSlave.__init__(self, store=store)
示例11: delete_model
def delete_model(self, model, store):
for field in model.fields:
store.remove(field)
ModelListSlave.delete_model(self, model, store)