def __init__ (self, view, viewcontrol, type):
   Control.__init__ (self, view)
   self.vc = viewcontrol    
   self.pm = PluginManager.getInstance()
   
   if type in [WizardPlugin.T_INPUT, WizardPlugin.T_OUTPUT]:
     self.type =  type  # TODO Parameter
   else:
     raise Exception("Invalid PluginType")
示例#2
0
    def updatePluginDependencies(self):
        for spec in PluginManager.getInstance().loadQueue():
            disableIndirectly = False
            if spec.name() in self.whitelist:
                continue
            for depSpec in spec.dependencySpecs():
                if not depSpec.isEnabled() or depSpec.isDisabledIndirectly():
                    disableIndirectly = True
                    break
            childItem = self.specToItem[spec]
            childItem.setDisabled(disableIndirectly)

            if disableIndirectly == spec.isDisabledIndirectly():
                continue
            spec.setDisabledIndirectly(disableIndirectly)

            if childItem.parent() and not childItem.parent().isExpanded():
                childItem.parent().setExpanded(True)
示例#3
0
    def initialize(self, arguments):
        self.initializeCalled = False
        obj = QObject(self)
        obj.setObjectName("MyPlugin1")
        self.addAutoReleaseObject(obj)

        found2 = False
        found3 = False
        for otherPluginObj in PluginManager.getInstance().allObjects():
            if otherPluginObj.objectName() == "MyPlugin2":
                found2 = True
            elif otherPluginObj.objectName() == "MyPlugin3":
                found3 = True
        if found2 and found3:
            return True, "No error"

        errorString = "object(s) missing from plugin(s):"
        if not found2:
            errorString += "plugin2"
        if not found3:
            errorString += "plugin3"
        return False, errorString