예제 #1
0
 def data(self, index, role):
     command = self.tools[index.row()]
     if role == QtCore.Qt.DisplayRole:
         return command
     elif role == QtCore.Qt.UserRole:
         return get_plugin_cls(command)
     return None        
예제 #2
0
 def data(self, index, role):
     command = self.tools[index.row()]
     if role == QtCore.Qt.DisplayRole:
         return command
     elif role == QtCore.Qt.UserRole:
         return get_plugin_cls(command)
     return None
 def __init__(self, bundle_widget, op, *args, **kwargs):
     """
 :param bundle_widget:
 :type bundle_widget: BundleWidget
 :param op:
 :type op: dict
 :param args:
 :param kwargs:
 """
     super(OperationWidget, self).__init__(*args, **kwargs)
     self.op = op
     self.plugin_class = plugin_loader.get_plugin_cls(self.op["Code"])
     self.descriptors = self.plugin_class.get_arg_descriptors()
     self.bundle_widget = bundle_widget
     self.items = []
     self.setupUi()
     self.bindUi()
예제 #4
0
 def __init__(self, bundle_widget, op, *args, **kwargs):
     """
 :param bundle_widget:
 :type bundle_widget: BundleWidget
 :param op:
 :type op: dict
 :param args:
 :param kwargs:
 """
     super(OperationWidget, self).__init__(*args, **kwargs)
     self.op = op
     self.plugin_class = plugin_loader.get_plugin_cls(self.op['Code'])
     self.descriptors = self.plugin_class.get_arg_descriptors()
     self.bundle_widget = bundle_widget
     self.items = []
     self.setupUi()
     self.bindUi()