Ejemplo n.º 1
0
 def getGroupIcon(group):
     if group == ProcessingConfig.tr('General'):
         return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
     if group in ProcessingConfig.settingIcons:
         return ProcessingConfig.settingIcons[group]
     else:
         return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
Ejemplo n.º 2
0
    def initGui(self):
        """startup"""

        # run
        run_icon = QIcon('%s/%s' %
                         (self.context.ppath, 'images/MetaSearch.png'))
        self.action_run = QAction(run_icon, 'MetaSearch',
                                  self.iface.mainWindow())
        self.action_run.setWhatsThis(
            QCoreApplication.translate('MetaSearch', 'MetaSearch plugin'))
        self.action_run.setStatusTip(
            QCoreApplication.translate('MetaSearch',
                                       'Search Metadata Catalogues'))

        self.action_run.triggered.connect(self.run)

        self.iface.addWebToolBarIcon(self.action_run)
        self.iface.addPluginToWebMenu(self.web_menu, self.action_run)

        # help
        help_icon = QIcon('%s/%s' % (self.context.ppath, 'images/help.png'))
        self.action_help = QAction(help_icon, 'Help', self.iface.mainWindow())
        self.action_help.setWhatsThis(
            QCoreApplication.translate('MetaSearch', 'MetaSearch plugin help'))
        self.action_help.setStatusTip(
            QCoreApplication.translate('MetaSearch', 'Get Help on MetaSearch'))
        self.action_help.triggered.connect(self.help)

        self.iface.addPluginToWebMenu(self.web_menu, self.action_help)

        # prefab the dialog but not open it yet
        self.dialog = MetaSearchDialog(self.iface)
Ejemplo n.º 3
0
    def __init__(self, parent, iface, pluginBase, pluginName, pluginCommand):
        QDialog.__init__(self, parent)
        self.setAttribute(Qt.WA_DeleteOnClose)
        self.iface = iface

        self.process = QProcess(self)
        Utils.setProcessEnvironment(self.process)
        self.process.error.connect(self.processError)
        self.process.finished.connect(self.processFinished)

        self.setupUi(self)
        self.arguments = []

        self.editCmdBtn.setIcon(QIcon(":/icons/edit.png"))
        self.editCmdBtn.toggled.connect(self.editCommand)
        self.resetCmdBtn.setIcon(QIcon(":/icons/reset.png"))
        self.resetCmdBtn.clicked.connect(self.resetCommand)
        self.editCommand(False)

        self.buttonBox.rejected.connect(self.reject)
        self.buttonBox.accepted.connect(self.accept)
        self.buttonBox.helpRequested.connect(self.help)

        self.buttonBox.button(QDialogButtonBox.Ok).setDefault(True)

        self.plugin = pluginBase
        self.valuesChanged.connect(self.handleRefreshArgs)

        self.pluginLayout.addWidget(self.plugin)
        self.plugin.setFocus()

        self.setWindowTitle(pluginName)
        self.setPluginCommand(pluginCommand)
Ejemplo n.º 4
0
    def __init__(self, parent):
        QDialog.__init__(self, parent)
        self.setWindowTitle(QCoreApplication.translate("SettingsDialogPythonConsole", "Settings Python Console"))
        self.parent = parent
        self.setupUi(self)

        self.listPath = []
        self.lineEdit.setReadOnly(True)

        self.restoreSettings()
        self.initialCheck()

        self.addAPIpath.setIcon(QIcon(":/images/themes/default/symbologyAdd.svg"))
        self.addAPIpath.setToolTip(QCoreApplication.translate("PythonConsole", "Add API path"))
        self.removeAPIpath.setIcon(QIcon(":/images/themes/default/symbologyRemove.svg"))
        self.removeAPIpath.setToolTip(QCoreApplication.translate("PythonConsole", "Remove API path"))

        self.preloadAPI.stateChanged.connect(self.initialCheck)
        self.addAPIpath.clicked.connect(self.loadAPIFile)
        self.removeAPIpath.clicked.connect(self.removeAPI)
        self.compileAPIs.clicked.connect(self._prepareAPI)

        self.resetFontColor.setIcon(QIcon(":/images/themes/default/console/iconResetColorConsole.png"))
        self.resetFontColor.setIconSize(QSize(18, 18))
        self.resetFontColorEditor.setIcon(QIcon(":/images/themes/default/console/iconResetColorConsole.png"))
        self.resetFontColorEditor.setIconSize(QSize(18, 18))
        self.resetFontColor.clicked.connect(self._resetFontColor)
        self.resetFontColorEditor.clicked.connect(self._resetFontColorEditor)
Ejemplo n.º 5
0
    def __init__(self, resourceType):
        super(GetScriptsAndModelsDialog, self).__init__(iface.mainWindow())
        self.setupUi(self)
        self.manager = QgsNetworkAccessManager.instance()

        self.resourceType = resourceType
        if self.resourceType == self.MODELS:
            self.folder = ModelerUtils.modelsFolder()
            self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/models/'
            self.icon = QIcon(os.path.join(pluginPath, 'images', 'model.png'))
        elif self.resourceType == self.SCRIPTS:
            self.folder = ScriptUtils.scriptsFolder()
            self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/scripts/'
            self.icon = QIcon(os.path.join(pluginPath, 'images', 'script.png'))
        else:
            self.folder = RUtils.RScriptsFolder()
            self.urlBase = 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master/rscripts/'
            self.icon = QIcon(os.path.join(pluginPath, 'images', 'r.svg'))

        self.lastSelectedItem = None
        self.updateToolbox = False
        self.populateTree()
        self.buttonBox.accepted.connect(self.okPressed)
        self.buttonBox.rejected.connect(self.cancelPressed)
        self.tree.currentItemChanged.connect(self.currentItemChanged)
Ejemplo n.º 6
0
    def __init__(self):
        super(HistoryDialog, self).__init__(None)
        self.setupUi(self)

        self.groupIcon = QIcon()
        self.groupIcon.addPixmap(
            self.style().standardPixmap(QStyle.SP_DirClosedIcon), QIcon.Normal,
            QIcon.Off)
        self.groupIcon.addPixmap(
            self.style().standardPixmap(QStyle.SP_DirOpenIcon), QIcon.Normal,
            QIcon.On)

        self.keyIcon = QIcon()
        self.keyIcon.addPixmap(self.style().standardPixmap(QStyle.SP_FileIcon))

        self.clearButton = QPushButton(self.tr('Clear'))
        self.clearButton.setToolTip(self.tr('Clear history'))
        self.buttonBox.addButton(self.clearButton, QDialogButtonBox.ActionRole)

        self.saveButton = QPushButton(self.tr('Save As...'))
        self.saveButton.setToolTip(self.tr('Save history'))
        self.buttonBox.addButton(self.saveButton, QDialogButtonBox.ActionRole)

        self.tree.doubleClicked.connect(self.executeAlgorithm)
        self.tree.currentItemChanged.connect(self.changeText)
        self.clearButton.clicked.connect(self.clearLog)
        self.saveButton.clicked.connect(self.saveLog)

        self.tree.setContextMenuPolicy(Qt.CustomContextMenu)
        self.tree.customContextMenuRequested.connect(self.showPopupMenu)

        self.fillTree()
Ejemplo n.º 7
0
    def __init__(self, position, action, folded):
        self.icons = {
            True: QIcon(os.path.join(pluginPath, 'images', 'plus.png')),
            False: QIcon(os.path.join(pluginPath, 'images', 'minus.png'))
        }

        self.folded = folded
        icon = self.icons[self.folded]
        super(FoldButtonGraphicItem, self).__init__(icon, position, action)
Ejemplo n.º 8
0
    def __init__(self, connection, parent=None):
        TreeItem.__init__(self, connection, parent)
        connection.changed.connect(self.itemChanged)
        connection.deleted.connect(self.itemRemoved)

        # load (shared) icon with first instance of table item
        if not hasattr(ConnectionItem, 'connectedIcon'):
            ConnectionItem.connectedIcon = QIcon(":/db_manager/icons/plugged.png")
            ConnectionItem.disconnectedIcon = QIcon(":/db_manager/icons/unplugged.png")
Ejemplo n.º 9
0
    def __init__(self, element, model):
        super(ModelerGraphicItem, self).__init__(None, None)
        self.model = model
        self.element = element
        if isinstance(element, ModelerParameter):
            icon = QIcon(os.path.join(pluginPath, 'images', 'input.png'))
            self.pixmap = icon.pixmap(20, 20, state=QIcon.On)
            self.text = element.param.description
        elif isinstance(element, ModelerOutput):
            # Output name
            icon = QIcon(os.path.join(pluginPath, 'images', 'output.png'))
            self.pixmap = icon.pixmap(20, 20, state=QIcon.On)
            self.text = element.description
        else:
            self.text = element.description
            self.pixmap = element.algorithm.getIcon().pixmap(15, 15)
        self.arrows = []
        self.setFlag(QGraphicsItem.ItemIsMovable, True)
        self.setFlag(QGraphicsItem.ItemIsSelectable, True)
        self.setFlag(QGraphicsItem.ItemSendsGeometryChanges, True)
        self.setZValue(1000)

        if not isinstance(element, ModelerOutput):
            icon = QIcon(os.path.join(pluginPath, 'images', 'edit.png'))
            pt = QPointF(
                ModelerGraphicItem.BOX_WIDTH / 2 -
                FlatButtonGraphicItem.WIDTH / 2,
                ModelerGraphicItem.BOX_HEIGHT / 2 -
                FlatButtonGraphicItem.HEIGHT / 2 + 1)
            self.editButton = FlatButtonGraphicItem(icon, pt, self.editElement)
            self.editButton.setParentItem(self)
            icon = QIcon(os.path.join(pluginPath, 'images', 'delete.png'))
            pt = QPointF(
                ModelerGraphicItem.BOX_WIDTH / 2 -
                FlatButtonGraphicItem.WIDTH / 2,
                -ModelerGraphicItem.BOX_HEIGHT / 2 +
                FlatButtonGraphicItem.HEIGHT / 2 + 1)
            self.deleteButton = FlatButtonGraphicItem(icon, pt,
                                                      self.removeElement)
            self.deleteButton.setParentItem(self)

        if isinstance(element, Algorithm):
            alg = element.algorithm
            if alg.parameters:
                pt = self.getLinkPointForParameter(-1)
                pt = QPointF(0, pt.y() + 2)
                self.inButton = FoldButtonGraphicItem(
                    pt, self.foldInput, self.element.paramsFolded)
                self.inButton.setParentItem(self)
            if alg.outputs:
                pt = self.getLinkPointForOutput(-1)
                pt = QPointF(0, pt.y() + 2)
                self.outButton = FoldButtonGraphicItem(
                    pt, self.foldOutput, self.element.outputsFolded)
                self.outButton.setParentItem(self)
Ejemplo n.º 10
0
    def __init__(self, connection):
        self.connIcon = QIcon(
            os.path.dirname(__file__) + '/../images/postgis.png')
        self.schemaIcon = QIcon(
            os.path.dirname(__file__) + '/../images/namespace.png')

        QTreeWidgetItem.__init__(self)
        self.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator)
        self.connection = connection
        self.setText(0, connection)
        self.setIcon(0, self.connIcon)
Ejemplo n.º 11
0
    def registerDatabaseActions(self, mainWindow):
        action = QAction(
            QApplication.translate("DBManagerPlugin", "&Re-connect"), self)
        mainWindow.registerAction(
            action, QApplication.translate("DBManagerPlugin", "&Database"),
            self.reconnectActionSlot)

        if self.schemas():
            action = QAction(
                QApplication.translate("DBManagerPlugin", "&Create schema"),
                self)
            mainWindow.registerAction(
                action, QApplication.translate("DBManagerPlugin", "&Schema"),
                self.createSchemaActionSlot)
            action = QAction(
                QApplication.translate("DBManagerPlugin",
                                       "&Delete (empty) schema"), self)
            mainWindow.registerAction(
                action, QApplication.translate("DBManagerPlugin", "&Schema"),
                self.deleteSchemaActionSlot)

        action = QAction(
            QApplication.translate("DBManagerPlugin", "Delete selected item"),
            self)
        mainWindow.registerAction(action, None, self.deleteActionSlot)
        action.setShortcuts(QKeySequence.Delete)

        action = QAction(
            QIcon(":/db_manager/actions/create_table"),
            QApplication.translate("DBManagerPlugin", "&Create table"), self)
        mainWindow.registerAction(
            action, QApplication.translate("DBManagerPlugin", "&Table"),
            self.createTableActionSlot)
        action = QAction(
            QIcon(":/db_manager/actions/edit_table"),
            QApplication.translate("DBManagerPlugin", "&Edit table"), self)
        mainWindow.registerAction(
            action, QApplication.translate("DBManagerPlugin", "&Table"),
            self.editTableActionSlot)
        action = QAction(
            QIcon(":/db_manager/actions/del_table"),
            QApplication.translate("DBManagerPlugin", "&Delete table/view"),
            self)
        mainWindow.registerAction(
            action, QApplication.translate("DBManagerPlugin", "&Table"),
            self.deleteTableActionSlot)
        action = QAction(
            QApplication.translate("DBManagerPlugin", "&Empty table"), self)
        mainWindow.registerAction(
            action, QApplication.translate("DBManagerPlugin", "&Table"),
            self.emptyTableActionSlot)
Ejemplo n.º 12
0
    def __init__(self, toolbox):
        super(ConfigDialog, self).__init__(None)
        self.setupUi(self)

        self.toolbox = toolbox
        self.groupIcon = QIcon()
        self.groupIcon.addPixmap(
            self.style().standardPixmap(QStyle.SP_DirClosedIcon), QIcon.Normal,
            QIcon.Off)
        self.groupIcon.addPixmap(
            self.style().standardPixmap(QStyle.SP_DirOpenIcon), QIcon.Normal,
            QIcon.On)

        if hasattr(self.searchBox, 'setPlaceholderText'):
            self.searchBox.setPlaceholderText(self.tr('Search...'))

        self.model = QStandardItemModel()
        self.tree.setModel(self.model)

        self.delegate = SettingDelegate()
        self.tree.setItemDelegateForColumn(1, self.delegate)

        self.searchBox.textChanged.connect(self.textChanged)

        self.fillTree()

        self.tree.expanded.connect(self.adjustColumns)
Ejemplo n.º 13
0
    def __init__(self, parent, alg):
        super(BatchPanel, self).__init__(None)
        self.setupUi(self)

        self.btnAdvanced.hide()

        # Set icons
        self.btnAdd.setIcon(QgsApplication.getThemeIcon('/symbologyAdd.svg'))
        self.btnRemove.setIcon(
            QgsApplication.getThemeIcon('/symbologyRemove.svg'))
        self.btnOpen.setIcon(
            QgsApplication.getThemeIcon('/mActionFileOpen.svg'))
        self.btnSave.setIcon(
            QgsApplication.getThemeIcon('/mActionFileSave.svg'))
        self.btnAdvanced.setIcon(
            QIcon(os.path.join(pluginPath, 'images', 'alg.png')))

        self.alg = alg
        self.parent = parent

        self.btnAdd.clicked.connect(self.addRow)
        self.btnRemove.clicked.connect(self.removeRows)
        self.btnOpen.clicked.connect(self.load)
        self.btnSave.clicked.connect(self.save)
        self.btnAdvanced.toggled.connect(self.toggleAdvancedMode)
        self.tblParameters.horizontalHeader().sectionDoubleClicked.connect(
            self.fillParameterValues)

        self.initWidgets()
Ejemplo n.º 14
0
    def __init__(self, schema, parent):
        TreeItem.__init__(self, schema, parent)
        schema.changed.connect(self.itemChanged)
        schema.deleted.connect(self.itemRemoved)

        # load (shared) icon with first instance of schema item
        if not hasattr(SchemaItem, 'schemaIcon'):
            SchemaItem.schemaIcon = QIcon(":/db_manager/icons/namespace.png")
Ejemplo n.º 15
0
    def registerDatabaseActions(self, mainWindow):
        action = QAction(QApplication.translate("DBManagerPlugin", "&Re-connect"), self)
        mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Database"),
                                  self.reconnectActionSlot)

        if self.schemas() is not None:
            action = QAction(QApplication.translate("DBManagerPlugin", "&Create schema"), self)
            mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Schema"),
                                      self.createSchemaActionSlot)
            action = QAction(QApplication.translate("DBManagerPlugin", "&Delete (empty) schema"), self)
            mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Schema"),
                                      self.deleteSchemaActionSlot)

        action = QAction(QApplication.translate("DBManagerPlugin", "Delete selected item"), self)
        mainWindow.registerAction(action, None, self.deleteActionSlot)
        action.setShortcuts(QKeySequence.Delete)

        action = QAction(QIcon(":/db_manager/actions/create_table"),
                         QApplication.translate("DBManagerPlugin", "&Create table"), self)
        mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"),
                                  self.createTableActionSlot)
        action = QAction(QIcon(":/db_manager/actions/edit_table"),
                         QApplication.translate("DBManagerPlugin", "&Edit table"), self)
        mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"), self.editTableActionSlot)
        action = QAction(QIcon(":/db_manager/actions/del_table"),
                         QApplication.translate("DBManagerPlugin", "&Delete table/view"), self)
        mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"),
                                  self.deleteTableActionSlot)
        action = QAction(QApplication.translate("DBManagerPlugin", "&Empty table"), self)
        mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"),
                                  self.emptyTableActionSlot)

        if self.schemas() is not None:
            action = QAction(QApplication.translate("DBManagerPlugin", "&Move to schema"), self)
            action.setMenu(QMenu(mainWindow))

            def invoke_callback():
                return mainWindow.invokeCallback(self.prepareMenuMoveTableToSchemaActionSlot)

            action.menu().aboutToShow.connect(invoke_callback)
            mainWindow.registerAction(action, QApplication.translate("DBManagerPlugin", "&Table"))
Ejemplo n.º 16
0
    def __init__(self, parent=None):
        super(FieldsMappingPanel, self).__init__(parent)
        self.setupUi(self)

        self.addButton.setIcon(QIcon(':/images/themes/default/mActionAdd.svg'))
        self.deleteButton.setIcon(
            QIcon(':/images/themes/default/mActionRemove.svg'))
        self.upButton.setIcon(
            QIcon(':/images/themes/default/mActionArrowUp.png'))
        self.downButton.setIcon(
            QIcon(':/images/themes/default/mActionArrowDown.png'))
        self.resetButton.setIcon(
            QIcon(':/images/themes/default/mIconClear.png'))

        self.model = FieldsMappingModel()
        self.fieldsView.setModel(self.model)

        self.model.rowsInserted.connect(self.on_model_rowsInserted)
        self.fieldsView.setItemDelegate(FieldDelegate())

        self.updateLayerCombo()
Ejemplo n.º 17
0
    def __init__(self):
        super(ResultsDialog, self).__init__(None)
        self.setupUi(self)

        self.keyIcon = QIcon()
        self.keyIcon.addPixmap(self.style().standardPixmap(QStyle.SP_FileIcon))

        self.tree.itemClicked.connect(self.changeResult)

        self.fillTree()

        if self.lastUrl:
            self.webView.load(self.lastUrl)
Ejemplo n.º 18
0
 def fillInputsTree(self):
     icon = QIcon(os.path.join(pluginPath, 'images', 'input.png'))
     parametersItem = QTreeWidgetItem()
     parametersItem.setText(0, self.tr('Parameters'))
     for paramType in ModelerParameterDefinitionDialog.paramTypes:
         paramItem = QTreeWidgetItem()
         paramItem.setText(0, paramType)
         paramItem.setIcon(0, icon)
         paramItem.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable
                            | Qt.ItemIsDragEnabled)
         parametersItem.addChild(paramItem)
     self.inputsTree.addTopLevelItem(parametersItem)
     parametersItem.setExpanded(True)
Ejemplo n.º 19
0
    def __init__(self, options, param):
        super(InputLayerSelectorPanel, self).__init__(None)
        self.setupUi(self)

        self.btnIterate.setIcon(
            QIcon(os.path.join(pluginPath, 'images', 'iterate.png')))
        self.btnIterate.hide()

        self.param = param

        for (name, value) in options:
            self.cmbText.addItem(name, value)

        self.btnSelect.clicked.connect(self.showSelectionDialog)
Ejemplo n.º 20
0
    def __init__(self, table, parent):
        TreeItem.__init__(self, table, parent)
        table.changed.connect(self.itemChanged)
        table.deleted.connect(self.itemRemoved)
        self.populate()

        # load (shared) icon with first instance of table item
        if not hasattr(TableItem, 'tableIcon'):
            TableItem.tableIcon = QIcon(":/db_manager/icons/table.png")
            TableItem.viewIcon = QIcon(":/db_manager/icons/view.png")
            TableItem.viewMaterializedIcon = QIcon(":/db_manager/icons/view_materialized.png")
            TableItem.layerPointIcon = QIcon(":/db_manager/icons/layer_point.png")
            TableItem.layerLineIcon = QIcon(":/db_manager/icons/layer_line.png")
            TableItem.layerPolygonIcon = QIcon(":/db_manager/icons/layer_polygon.png")
            TableItem.layerRasterIcon = QIcon(":/db_manager/icons/layer_raster.png")
            TableItem.layerUnknownIcon = QIcon(":/db_manager/icons/layer_unknown.png")
Ejemplo n.º 21
0
def load(db, mainwindow):
    # check whether the selected database supports topology
    # (search for topology.topology)
    sql = u"""SELECT count(*)
                FROM pg_class AS cls JOIN pg_namespace AS nsp ON nsp.oid = cls.relnamespace
                WHERE cls.relname = 'topology' AND nsp.nspname = 'topology'"""
    c = db.connector._get_cursor()
    db.connector._execute(c, sql)
    res = db.connector._fetchone(c)
    if res is None or int(res[0]) <= 0:
        return

    # add the action to the DBManager menu
    action = QAction(QIcon(), "&TopoViewer", db)
    mainwindow.registerAction(action, "&Schema", run)
Ejemplo n.º 22
0
    def __init__(self, descriptionFile, script=None):
        """The script parameter can be used to directly pass the code
        of the script without a file.

        This is to be used from the script edition dialog, but should
        not be used in other cases.
        """

        GeoAlgorithm.__init__(self)
        self._icon = QIcon(os.path.join(pluginPath, 'images', 'script.png'))

        self.script = script
        self.allowEdit = True
        self.noCRSWarning = False
        self.descriptionFile = descriptionFile
        if script is not None:
            self.defineCharacteristicsFromScript()
        if descriptionFile is not None:
            self.defineCharacteristicsFromFile()
Ejemplo n.º 23
0
 def initGui(self):
     self.action = QAction(
         QIcon(":/db_manager/icon"),
         QApplication.translate("DBManagerPlugin", "DB Manager"),
         self.iface.mainWindow())
     self.action.setObjectName("dbManager")
     self.action.triggered.connect(self.run)
     # Add toolbar button and menu item
     if hasattr(self.iface, 'addDatabaseToolBarIcon'):
         self.iface.addDatabaseToolBarIcon(self.action)
     else:
         self.iface.addToolBarIcon(self.action)
     if hasattr(self.iface, 'addPluginToDatabaseMenu'):
         self.iface.addPluginToDatabaseMenu(
             QApplication.translate("DBManagerPlugin", "DB Manager"),
             self.action)
     else:
         self.iface.addPluginToMenu(
             QApplication.translate("DBManagerPlugin", "DB Manager"),
             self.action)
Ejemplo n.º 24
0
    def __init__(self):
        self._icon = QIcon(os.path.dirname(__file__) + '/../images/alg.png')
        # Parameters needed by the algorithm
        self.parameters = list()

        # Outputs generated by the algorithm
        self.outputs = list()

        # Name and group for normal toolbox display
        self.name, self.i18n_name = '', ''
        self.group, self.i18n_group = '', ''

        # The crs taken from input layers (if possible), and used when
        # loading output layers
        self.crs = None

        # Change any of the following if your algorithm should not
        # appear in the toolbox or modeler
        self.showInToolbox = True
        self.showInModeler = True
        #if true, will show only loaded layers in parameters dialog.
        #Also, if True, the algorithm does not run on the modeler
        #or batch ptocessing interface
        self.allowOnlyOpenedLayers = False

        # False if it should not be run a a batch process
        self.canRunInBatchMode = True

        # To be set by the provider when it loads the algorithm
        self.provider = None

        # If the algorithm is run as part of a model, the parent model
        # can be set in this variable, to allow for customized
        # behaviour, in case some operations should be run differently
        # when running as part of a model
        self.model = None

        self.defineCharacteristics()
Ejemplo n.º 25
0
 def getIcon(self):
     return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'mean.png'))
Ejemplo n.º 26
0
 def getIcon(self):
     return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'projection-export.png'))
Ejemplo n.º 27
0
 def getIcon(self):
     return QIcon(os.path.join(pluginPath, 'images', 'r.png'))
Ejemplo n.º 28
0
 def getIcon(self):
     return QIcon(os.path.dirname(__file__) + '/../../images/taudem.svg')
Ejemplo n.º 29
0
 def getIcon(self):
     return QIcon(os.path.dirname(__file__) + '/../images/alg.png')
Ejemplo n.º 30
0
 def getIcon(self):
     return QIcon(
         os.path.join(pluginPath, 'images', 'ftools', 'vector_grid.png'))