Example #1
0
 def load(self):
     ProcessingConfig.settingIcons[self.name()] = self.icon()
     ProcessingConfig.addSetting(
         Setting(self.name(), 'ACTIVATE_R', self.tr('Activate'), False))
     ProcessingConfig.addSetting(
         Setting(self.name(),
                 RUtils.RSCRIPTS_FOLDER,
                 self.tr('R Scripts folder'),
                 RUtils.defaultRScriptsFolder(),
                 valuetype=Setting.MULTIPLE_FOLDERS))
     if isWindows():
         ProcessingConfig.addSetting(
             Setting(self.name(),
                     RUtils.R_FOLDER,
                     self.tr('R folder'),
                     RUtils.RFolder(),
                     valuetype=Setting.FOLDER))
         ProcessingConfig.addSetting(
             Setting(self.name(),
                     RUtils.R_LIBS_USER,
                     self.tr('R user library folder'),
                     RUtils.RLibs(),
                     valuetype=Setting.FOLDER))
         ProcessingConfig.addSetting(
             Setting(self.name(), RUtils.R_USE64,
                     self.tr('Use 64 bit version'), False))
     ProviderActions.registerProviderActions(self, self.actions)
     ProviderContextMenuActions.registerProviderContextMenuActions(
         self.contextMenuActions)
     ProcessingConfig.readSettings()
     self.refreshAlgorithms()
     return True
Example #2
0
 def load(self):
     ProcessingConfig.settingIcons[self.name()] = self.icon()
     ProcessingConfig.addSetting(Setting(self.name(), 'ACTIVATE_R',
                                         self.tr('Activate'), False))
     ProcessingConfig.addSetting(Setting(
         self.name(), RUtils.RSCRIPTS_FOLDER,
         self.tr('R Scripts folder'), RUtils.defaultRScriptsFolder(),
         valuetype=Setting.MULTIPLE_FOLDERS))
     if isWindows():
         ProcessingConfig.addSetting(Setting(
             self.name(),
             RUtils.R_FOLDER, self.tr('R folder'), RUtils.RFolder(),
             valuetype=Setting.FOLDER))
         ProcessingConfig.addSetting(Setting(
             self.name(),
             RUtils.R_LIBS_USER, self.tr('R user library folder'),
             RUtils.RLibs(), valuetype=Setting.FOLDER))
         ProcessingConfig.addSetting(Setting(
             self.name(),
             RUtils.R_USE64, self.tr('Use 64 bit version'), False))
     ProviderActions.registerProviderActions(self, self.actions)
     ProviderContextMenuActions.registerProviderContextMenuActions(self.contextMenuActions)
     ProcessingConfig.readSettings()
     self.refreshAlgorithms()
     return True
Example #3
0
 def load(self):
     ProcessingConfig.settingIcons[self.name()] = self.icon()
     ProcessingConfig.addSetting(Setting(self.name(),
                                         ModelerUtils.MODELS_FOLDER, self.tr('Models folder', 'ModelerAlgorithmProvider'),
                                         ModelerUtils.defaultModelsFolder(), valuetype=Setting.MULTIPLE_FOLDERS))
     ProviderActions.registerProviderActions(self, self.actions)
     ProviderContextMenuActions.registerProviderContextMenuActions(self.contextMenuActions)
     ProcessingConfig.readSettings()
     self.refreshAlgorithms()
     return True
Example #4
0
 def load(self):
     ProcessingConfig.settingIcons[self.name()] = self.icon()
     ProcessingConfig.addSetting(Setting(self.name(),
                                         ModelerUtils.MODELS_FOLDER, self.tr('Models folder', 'ModelerAlgorithmProvider'),
                                         ModelerUtils.defaultModelsFolder(), valuetype=Setting.MULTIPLE_FOLDERS))
     ProviderActions.registerProviderActions(self, self.actions)
     ProviderContextMenuActions.registerProviderContextMenuActions(self.contextMenuActions)
     ProcessingConfig.readSettings()
     self.refreshAlgorithms()
     return True
Example #5
0
    def load(self):
        """
        Called when first loading provider
        """
        ProcessingConfig.settingIcons[self.name()] = self.icon()
        ProcessingConfig.addSetting(
            Setting(self.name(), 'ACTIVATE_R', self.tr('Activate'), False))
        ProcessingConfig.addSetting(
            Setting(self.name(),
                    RUtils.RSCRIPTS_FOLDER,
                    self.tr('R scripts folder'),
                    RUtils.default_scripts_folder(),
                    valuetype=Setting.MULTIPLE_FOLDERS))

        ProcessingConfig.addSetting(
            Setting(self.name(), 'ACTIVATE_R', self.tr('Activate'), False))

        ProcessingConfig.addSetting(
            Setting(
                self.name(), RUtils.R_USE_USER_LIB,
                self.tr('Use user library folder instead of system libraries'),
                True))
        ProcessingConfig.addSetting(
            Setting(self.name(),
                    RUtils.R_LIBS_USER,
                    self.tr('User library folder'),
                    RUtils.r_library_folder(),
                    valuetype=Setting.FOLDER))

        ProcessingConfig.addSetting(
            Setting(self.name(),
                    RUtils.R_REPO,
                    self.tr('Package repository'),
                    "http://cran.at.r-project.org/",
                    valuetype=Setting.STRING))

        ProcessingConfig.addSetting(
            Setting(self.name(),
                    RUtils.R_FOLDER,
                    self.tr('R folder'),
                    RUtils.r_binary_folder(),
                    valuetype=Setting.FOLDER))

        if RUtils.is_windows():
            ProcessingConfig.addSetting(
                Setting(self.name(), RUtils.R_USE64,
                        self.tr('Use 64 bit version'), False))

        ProviderActions.registerProviderActions(self, self.actions)
        ProviderContextMenuActions.registerProviderContextMenuActions(
            self.contextMenuActions)
        ProcessingConfig.readSettings()
        self.refreshAlgorithms()
        return True
Example #6
0
    def load(self):
        ProcessingConfig.settingIcons[self.name()] = self.icon()
        ProcessingConfig.addSetting(Setting(self.name(),
                                            ScriptUtils.SCRIPTS_FOLDERS,
                                            self.tr("Scripts folder(s)"),
                                            ScriptUtils.defaultScriptsFolder(),
                                            valuetype=Setting.MULTIPLE_FOLDERS))

        ProviderActions.registerProviderActions(self, self.actions)
        ProviderContextMenuActions.registerProviderContextMenuActions(self.contextMenuActions)

        ProcessingConfig.readSettings()
        self.refreshAlgorithms()

        return True
Example #7
0
    def load(self):
        ProcessingConfig.settingIcons[self.name()] = self.icon()
        ProcessingConfig.addSetting(Setting(self.name(),
                                            ScriptUtils.SCRIPTS_FOLDERS,
                                            self.tr("Scripts folder(s)"),
                                            ScriptUtils.defaultScriptsFolder(),
                                            valuetype=Setting.MULTIPLE_FOLDERS))

        ProviderActions.registerProviderActions(self, self.actions)
        ProviderContextMenuActions.registerProviderContextMenuActions(self.contextMenuActions)

        ProcessingConfig.readSettings()
        self.refreshAlgorithms()

        return True
Example #8
0
    def load(self):
        """
        Called when first loading provider
        """
        ProcessingConfig.settingIcons[self.name()] = self.icon()
        ProcessingConfig.addSetting(
            Setting(self.name(),
                    JsUtils.SCRIPTS_FOLDER,
                    self.tr('Javascript scripts folder'),
                    JsUtils.default_scripts_folder(),
                    valuetype=Setting.MULTIPLE_FOLDERS))

        ProviderActions.registerProviderActions(self, self.actions)
        ProviderContextMenuActions.registerProviderContextMenuActions(
            self.contextMenuActions)
        ProcessingConfig.readSettings()
        self.refreshAlgorithms()
        return True