Skip to content
Permalink
Browse files
add missed plugin files
fix CMakeLists.txt
  • Loading branch information
alexbruy committed Jun 21, 2021
1 parent a62fd8c commit cbe1a472cae88971f4dd915d9b102e27d2cfa25e
@@ -54,6 +54,7 @@ if (WITH_GUI)
endif()
add_subdirectory(processing)
add_subdirectory(sagaprovider)
add_subdirectory(grassprovider)
add_subdirectory(MetaSearch)

PY_COMPILE(staged-plugins "${PYTHON_OUTPUT_DIRECTORY}/plugins")
@@ -1,8 +1,8 @@
file(GLOB PY_FILES *.py)
file(GLOB OTHER_FILES grass7.txt)
file(GLOB OTHER_FILES grass7.txt metadata.txt)
file(GLOB DESCR_FILES description/*.txt)

add_subdirectory(ext)

PLUGIN_INSTALL(processing algs/grass7 ${PY_FILES} ${OTHER_FILES})
PLUGIN_INSTALL(processing algs/grass7/description ${DESCR_FILES})
PLUGIN_INSTALL(grassprovider . ${PY_FILES} ${OTHER_FILES})
PLUGIN_INSTALL(grassprovider ./description ${DESCR_FILES})
@@ -35,9 +35,6 @@
from .Grass7Algorithm import Grass7Algorithm
from processing.tools.system import isWindows, isMac

pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))


class Grass7AlgorithmProvider(QgsProcessingProvider):
descriptionFolder = Grass7Utils.grassDescriptionPath()
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
GrassProviderPlugin.py
---------------------
Date : June 2021
Copyright : (C) 2021 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""

__author__ = 'Alexander Bruy'
__date__ = 'June 2021'
__copyright__ = '(C) 2021, Alexander Bruy'


from qgis.core import QgsApplication

from grassprovider.Grass7AlgorithmProvider import Grass7AlgorithmProvider


class GrassProviderPlugin:

def __init__(self):
self.provider = Grass7AlgorithmProvider()

def initGui(self):
QgsApplication.processingRegistry().addProvider(self.provider)

def unload(self):
QgsApplication.processingRegistry().removeProvider(self.provider)
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-

"""
***************************************************************************
__init__.py
---------------------
Date : June 2021
Copyright : (C) 2021 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""

__author__ = 'Alexander Bruy'
__date__ = 'June 2021'
__copyright__ = '(C) 2021, Alexander Bruy'


def classFactory(iface):
from grassprovider.GrassProviderPlugin import GrassProviderPlugin
return GrassProviderPlugin()
@@ -0,0 +1,17 @@
[general]
name=GRASS GIS provider
description=GRASS GIS Processing provider
about=GRASS GIS Processing provider
category=Analysis
version=2.12.99
qgisMinimumVersion=3.0

author=Victor Olaya

icon=:/images/themes/default/providerGrass.svg

homepage=https://qgis.org
tracker=https://github.com/qgis/QGIS/issues
repository=https://github.com/qgis/QGIS

hasProcessingProvider=yes
@@ -2,7 +2,6 @@ file(GLOB PY_FILES *.py)

add_subdirectory(help)
add_subdirectory(gdal)
add_subdirectory(grass7)
add_subdirectory(otb)
add_subdirectory(qgis)

@@ -56,9 +56,6 @@
with QgsRuntimeProfiler.profile('Import QGIS Provider'):
from processing.algs.qgis.QgisAlgorithmProvider import QgisAlgorithmProvider # NOQA

with QgsRuntimeProfiler.profile('Import GRASS Provider'):
from processing.algs.grass7.Grass7AlgorithmProvider import Grass7AlgorithmProvider

with QgsRuntimeProfiler.profile('Import GDAL Provider'):
from processing.algs.gdal.GdalAlgorithmProvider import GdalAlgorithmProvider # NOQA

@@ -114,7 +111,6 @@ def initialize():
# Add the basic providers
for c in [
QgisAlgorithmProvider,
Grass7AlgorithmProvider,
GdalAlgorithmProvider,
OtbAlgorithmProvider,
ScriptAlgorithmProvider,

0 comments on commit cbe1a47

Please sign in to comment.