Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
processing: switch to pyqt wrappers, flake8 fixes
  • Loading branch information
jef-n committed Mar 21, 2016
1 parent 9db908c commit 2526d3e
Show file tree
Hide file tree
Showing 352 changed files with 971 additions and 992 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -30,8 +30,9 @@
import os
import sys

from PyQt4.QtCore import Qt, QCoreApplication, QDir
from PyQt4.QtGui import QMenu, QAction, QIcon
from PyQt.QtCore import Qt, QCoreApplication, QDir
from PyQt.QtWidgets import QMenu, QAction
from PyQt.QtGui import QIcon

from processing.core.Processing import Processing
from processing.gui.ProcessingToolbox import ProcessingToolbox
Expand Down
12 changes: 6 additions & 6 deletions python/plugins/processing/__init__.py
Expand Up @@ -25,12 +25,12 @@

__revision__ = '$Format:%H$'

from processing.tools.dataobjects import *
from processing.tools.general import *
from processing.tools.vector import *
from processing.tools.raster import *
from processing.tools.system import *
from processing.tests.TestData import loadTestData
from processing.tools.dataobjects import * # NOQA
from processing.tools.general import * # NOQA
from processing.tools.vector import * # NOQA
from processing.tools.raster import * # NOQA
from processing.tools.system import * # NOQA
from processing.tests.TestData import loadTestData # NOQA


def classFactory(iface):
Expand Down
Expand Up @@ -25,7 +25,7 @@

__revision__ = '$Format:%H$'

from PyQt4.QtCore import QSettings
from PyQt.QtCore import QSettings
from qgis.core import QgsVectorFileWriter

from processing.core.GeoAlgorithm import GeoAlgorithm
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/AssignProjection.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
Expand Down Expand Up @@ -62,7 +62,7 @@ def defineCharacteristics(self):
def getConsoleCommands(self):
fileName = self.getParameterValue(self.INPUT)
crs = self.getParameterValue(self.CRS)
output = self.getOutputValue(self.OUTPUT)
output = self.getOutputValue(self.OUTPUT) # NOQA

arguments = []
arguments.append('-a_srs')
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/ClipByExtent.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/ClipByMask.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from osgeo import gdal

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/GdalAlgorithm.py
Expand Up @@ -28,7 +28,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.algs.gdal.GdalAlgorithmDialog import GdalAlgorithmDialog
Expand All @@ -53,7 +53,7 @@ def shortHelp(self):
return self._formatHelp('''This algorithm is based on the GDAL %s module.
For more info, see the <a href = 'http://www.gdal.org/%s.html'> module help</a>
''' % (self.commandName(), self.commandName()))
''' % (self.commandName(), self.commandName()))

def commandName(self):
alg = self.getCopy()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'

from qgis.core import QgsMapLayerRegistry
from PyQt4.QtGui import QWidget, QVBoxLayout, QPushButton, QLabel, QPlainTextEdit, QLineEdit, QComboBox, QCheckBox
from PyQt.QtWidgets import QWidget, QVBoxLayout, QPushButton, QLabel, QPlainTextEdit, QLineEdit, QComboBox, QCheckBox
from processing.gui.AlgorithmDialog import AlgorithmDialog
from processing.gui.AlgorithmDialogBase import AlgorithmDialogBase
from processing.gui.ParametersPanel import ParametersPanel
Expand Down
104 changes: 52 additions & 52 deletions python/plugins/processing/algs/gdal/GdalOgrAlgorithmProvider.py
Expand Up @@ -26,60 +26,60 @@
__revision__ = '$Format:%H$'

import os
from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.core.AlgorithmProvider import AlgorithmProvider
from GdalUtils import GdalUtils

from nearblack import nearblack
from information import information
from warp import warp
from rgb2pct import rgb2pct
from translate import translate
from pct2rgb import pct2rgb
from merge import merge
from buildvrt import buildvrt
from polygonize import polygonize
from gdaladdo import gdaladdo
from ClipByExtent import ClipByExtent
from ClipByMask import ClipByMask
from contour import contour
from rasterize import rasterize
from proximity import proximity
from sieve import sieve
from fillnodata import fillnodata
from extractprojection import ExtractProjection
from gdal2xyz import gdal2xyz
from hillshade import hillshade
from slope import slope
from aspect import aspect
from tri import tri
from tpi import tpi
from roughness import roughness
from ColorRelief import ColorRelief
from GridInvDist import GridInvDist
from GridAverage import GridAverage
from GridNearest import GridNearest
from GridDataMetrics import GridDataMetrics
from gdaltindex import gdaltindex
from gdalcalc import gdalcalc
from rasterize_over import rasterize_over
from retile import retile
from gdal2tiles import gdal2tiles
from AssignProjection import AssignProjection

from ogr2ogr import Ogr2Ogr
from ogr2ogrclip import Ogr2OgrClip
from ogr2ogrclipextent import Ogr2OgrClipExtent
from ogr2ogrtopostgis import Ogr2OgrToPostGis
from ogr2ogrtopostgislist import Ogr2OgrToPostGisList
from ogr2ogrpointsonlines import Ogr2OgrPointsOnLines
from ogr2ogrbuffer import Ogr2OgrBuffer
from ogr2ogrdissolve import Ogr2OgrDissolve
from ogr2ogronesidebuffer import Ogr2OgrOneSideBuffer
from ogr2ogrtabletopostgislist import Ogr2OgrTableToPostGisList
from ogrinfo import OgrInfo
from ogrsql import OgrSql
from .GdalUtils import GdalUtils

from .nearblack import nearblack
from .information import information
from .warp import warp
from .rgb2pct import rgb2pct
from .translate import translate
from .pct2rgb import pct2rgb
from .merge import merge
from .buildvrt import buildvrt
from .polygonize import polygonize
from .gdaladdo import gdaladdo
from .ClipByExtent import ClipByExtent
from .ClipByMask import ClipByMask
from .contour import contour
from .rasterize import rasterize
from .proximity import proximity
from .sieve import sieve
from .fillnodata import fillnodata
from .extractprojection import ExtractProjection
from .gdal2xyz import gdal2xyz
from .hillshade import hillshade
from .slope import slope
from .aspect import aspect
from .tri import tri
from .tpi import tpi
from .roughness import roughness
from .ColorRelief import ColorRelief
from .GridInvDist import GridInvDist
from .GridAverage import GridAverage
from .GridNearest import GridNearest
from .GridDataMetrics import GridDataMetrics
from .gdaltindex import gdaltindex
from .gdalcalc import gdalcalc
from .rasterize_over import rasterize_over
from .retile import retile
from .gdal2tiles import gdal2tiles
from .AssignProjection import AssignProjection

from .ogr2ogr import Ogr2Ogr
from .ogr2ogrclip import Ogr2OgrClip
from .ogr2ogrclipextent import Ogr2OgrClipExtent
from .ogr2ogrtopostgis import Ogr2OgrToPostGis
from .ogr2ogrtopostgislist import Ogr2OgrToPostGisList
from .ogr2ogrpointsonlines import Ogr2OgrPointsOnLines
from .ogr2ogrbuffer import Ogr2OgrBuffer
from .ogr2ogrdissolve import Ogr2OgrDissolve
from .ogr2ogronesidebuffer import Ogr2OgrOneSideBuffer
from .ogr2ogrtabletopostgislist import Ogr2OgrTableToPostGisList
from .ogrinfo import OgrInfo
from .ogrsql import OgrSql

pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GdalUtils.py
Expand Up @@ -28,7 +28,7 @@
import os
import subprocess
import platform
from PyQt4.QtCore import QSettings
from PyQt.QtCore import QSettings
from qgis.core import QgsApplication
from processing.core.ProcessingLog import ProcessingLog

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridAverage.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridDataMetrics.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridInvDist.py
Expand Up @@ -28,7 +28,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/GridNearest.py
Expand Up @@ -28,7 +28,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterVector
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/buildvrt.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.outputs import OutputRaster
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/contour.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/extractprojection.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from osgeo import gdal, osr

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/gdaladdo.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/gdaltindex.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.outputs import OutputVector
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/information.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/merge.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.outputs import OutputRaster
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/nearblack.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
Expand Down
Expand Up @@ -25,7 +25,7 @@

__revision__ = '$Format:%H$'

from PyQt4.QtCore import QSettings
from PyQt.QtCore import QSettings

from processing.core.parameters import ParameterString
from processing.core.parameters import ParameterTable
Expand Down
Expand Up @@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'


from PyQt4.QtCore import QSettings
from PyQt.QtCore import QSettings

from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterString
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/pct2rgb.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.tools.system import isWindows
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/polygonize.py
Expand Up @@ -27,8 +27,8 @@

import os

from PyQt4.QtGui import QIcon
from PyQt4.QtCore import QFileInfo
from PyQt.QtGui import QIcon
from PyQt.QtCore import QFileInfo

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/proximity.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.core.parameters import ParameterRaster
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/rasterize.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterExtent
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/gdal/rasterize_over.py
Expand Up @@ -27,7 +27,7 @@

import os

from PyQt4.QtGui import QIcon
from PyQt.QtGui import QIcon

from processing.core.parameters import ParameterVector
from processing.core.parameters import ParameterRaster
Expand Down

0 comments on commit 2526d3e

Please sign in to comment.