예제 #1
0
    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
0
    def __init__(self, parent, store, product, visual_mode=False):
        self._product = product
        ModelListSlave.__init__(self, parent)
        store = self._product.store
        self.set_reuse_store(store)
        if visual_mode:
            self.set_list_type(ListType.READONLY)

        self.refresh()
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
 def __init__(self, store, device, reuse_store=False):
     self.device = device
     ModelListSlave.__init__(self, store=store, reuse_store=reuse_store)
예제 #6
0
 def __init__(self, store, device):
     self.device = device
     ModelListSlave.__init__(self, store=store)
예제 #7
0
 def __init__(self, parent, store, reuse_store=False):
     ModelListSlave.__init__(self, parent, store, reuse_store=reuse_store)
     self.set_list_type(ListType.UNREMOVABLE)
예제 #8
0
 def edit_item(self, item):
     if item.brand == 'virtual':
         info(_("Cant edit a virtual printer"))
         return False
     return ModelListSlave.edit_item(self, item)
예제 #9
0
 def __init__(self, client, parent, store):
     self._client = client
     ModelListSlave.__init__(self, parent, store)
     self.set_list_type(ListType.UNREMOVABLE)
예제 #10
0
 def __init__(self, store, attribute):
     self._attribute = attribute
     ModelListSlave.__init__(self, store=store, reuse_store=True)
예제 #11
0
 def __init__(self, client, parent, store):
     self._client = client
     ModelListSlave.__init__(self, parent, store)
     self.set_list_type(ListType.UNREMOVABLE)
예제 #12
0
 def edit_item(self, item):
     if item.brand == 'virtual':
         info(_("Cant edit a virtual printer"))
         return False
     return ModelListSlave.edit_item(self, item)
예제 #13
0
 def __init__(self, *args, **kwargs):
     ModelListSlave.__init__(self, *args, **kwargs)
     self.set_list_type(ListType.ADDONLY)
예제 #14
0
 def __init__(self, store, device, reuse_store=False):
     self.device = device
     ModelListSlave.__init__(self, store=store, reuse_store=reuse_store)
예제 #15
0
 def delete_model(self, model, store):
     for field in model.fields:
         store.remove(field)
     ModelListSlave.delete_model(self, model, store)
예제 #16
0
 def __init__(self, store, device):
     self.device = device
     ModelListSlave.__init__(self, store=store)
예제 #17
0
 def delete_model(self, model, store):
     for field in model.fields:
         store.remove(field)
     ModelListSlave.delete_model(self, model, store)
예제 #18
0
 def __init__(self, parent, store, reuse_store=False):
     ModelListSlave.__init__(self, parent, store, reuse_store=reuse_store)
     self.set_list_type(ListType.UNREMOVABLE)
예제 #19
0
 def __init__(self, *args, **kwargs):
     ModelListSlave.__init__(self, *args, **kwargs)
     self.set_list_type(ListType.ADDONLY)
예제 #20
0
 def __init__(self, *args, **kwargs):
     ModelListSlave.__init__(self, *args, **kwargs)
     self.set_list_type(ListType.UNREMOVABLE)
예제 #21
0
 def __init__(self, store, attribute):
     self._attribute = attribute
     ModelListSlave.__init__(self, store=store, reuse_store=True)