mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-22 00:14:55 -05:00
indentation update
This commit is contained in:
parent
3a93ca62a9
commit
f996c54776
@ -387,6 +387,8 @@ def getRasterResolution(fileName):
|
||||
# 3. bypass the following bug:
|
||||
# when you use the 'filter' argument, the dialog is enlarged up to the longest filter length,
|
||||
# so sometimes the dialog excedes the screen width
|
||||
|
||||
|
||||
class FileDialog:
|
||||
|
||||
@classmethod
|
||||
|
||||
@ -31,6 +31,7 @@ from ui_widgetClipper import Ui_GdalToolsWidget as Ui_Widget
|
||||
from widgetPluginBase import GdalToolsBasePluginWidget as BasePluginWidget
|
||||
import GdalTools_utils as Utils
|
||||
|
||||
|
||||
class GdalToolsDialog(QWidget, Ui_Widget, BasePluginWidget):
|
||||
|
||||
def __init__(self, iface):
|
||||
|
||||
@ -69,26 +69,26 @@ class ClipByExtent(GdalAlgorithm):
|
||||
|
||||
params = []
|
||||
params.append(ParameterSelection(self.RTYPE,
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
params.append(ParameterSelection(self.COMPRESS,
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
params.append(ParameterNumber(self.JPEGCOMPRESSION,
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
params.append(ParameterNumber(self.ZLEVEL,
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
params.append(ParameterNumber(self.PREDICTOR,
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
params.append(ParameterBoolean(self.TILED,
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
params.append(ParameterSelection(self.BIGTIFF,
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
params.append(ParameterBoolean(self.TFW,
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
params.append(ParameterString(self.EXTRA,
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
|
||||
for param in params:
|
||||
param.isAdvanced = True
|
||||
|
||||
@ -42,7 +42,7 @@ from processing.algs.gdal.OgrAlgorithm import OgrAlgorithm
|
||||
from processing.algs.gdal.GdalUtils import GdalUtils
|
||||
|
||||
|
||||
class ClipByMask(GdalAlgorithm,OgrAlgorithm):
|
||||
class ClipByMask(GdalAlgorithm, OgrAlgorithm):
|
||||
|
||||
INPUT = 'INPUT'
|
||||
OUTPUT = 'OUTPUT'
|
||||
@ -82,26 +82,26 @@ class ClipByMask(GdalAlgorithm,OgrAlgorithm):
|
||||
|
||||
params = []
|
||||
params.append(ParameterSelection(self.RTYPE,
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
params.append(ParameterSelection(self.COMPRESS,
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
params.append(ParameterNumber(self.JPEGCOMPRESSION,
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
params.append(ParameterNumber(self.ZLEVEL,
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
params.append(ParameterNumber(self.PREDICTOR,
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
params.append(ParameterBoolean(self.TILED,
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
params.append(ParameterSelection(self.BIGTIFF,
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
params.append(ParameterBoolean(self.TFW,
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
params.append(ParameterString(self.EXTRA,
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
|
||||
for param in params:
|
||||
param.isAdvanced = True
|
||||
|
||||
@ -37,6 +37,7 @@ from processing.algs.gdal.OgrAlgorithm import OgrAlgorithm
|
||||
|
||||
DIALECTS = [None, 'ogrsql', 'sqlite']
|
||||
|
||||
|
||||
class OgrSql(OgrAlgorithm):
|
||||
|
||||
INPUT = 'INPUT'
|
||||
|
||||
@ -101,7 +101,7 @@ class rasterize(OgrAlgorithm):
|
||||
self.addParameter(ParameterBoolean(self.TFW,
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw)'), False))
|
||||
params.append(ParameterString(self.EXTRA,
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
|
||||
for param in params:
|
||||
param.isAdvanced = True
|
||||
|
||||
@ -90,26 +90,26 @@ class translate(GdalAlgorithm):
|
||||
|
||||
params = []
|
||||
params.append(ParameterSelection(self.RTYPE,
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
params.append(ParameterSelection(self.COMPRESS,
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
params.append(ParameterNumber(self.JPEGCOMPRESSION,
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
params.append(ParameterNumber(self.ZLEVEL,
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
params.append(ParameterNumber(self.PREDICTOR,
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
params.append(ParameterBoolean(self.TILED,
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
params.append(ParameterSelection(self.BIGTIFF,
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
params.append(ParameterBoolean(self.TFW,
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
params.append(ParameterString(self.EXTRA,
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
|
||||
for param in params:
|
||||
param.isAdvanced = True
|
||||
|
||||
@ -78,26 +78,26 @@ class warp(GdalAlgorithm):
|
||||
|
||||
params = []
|
||||
params.append(ParameterSelection(self.RTYPE,
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
self.tr('Output raster type'), self.TYPE, 5))
|
||||
params.append(ParameterSelection(self.COMPRESS,
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
self.tr('GeoTIFF options. Compression type:'), self.COMPRESSTYPE, 4))
|
||||
params.append(ParameterNumber(self.JPEGCOMPRESSION,
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
self.tr('Set the JPEG compression level'),
|
||||
1, 100, 75))
|
||||
params.append(ParameterNumber(self.ZLEVEL,
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
self.tr('Set the DEFLATE compression level'),
|
||||
1, 9, 6))
|
||||
params.append(ParameterNumber(self.PREDICTOR,
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
self.tr('Set the predictor for LZW or DEFLATE compression'),
|
||||
1, 3, 1))
|
||||
params.append(ParameterBoolean(self.TILED,
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
self.tr('Create tiled output (only used for the GTiff format)'), False))
|
||||
params.append(ParameterSelection(self.BIGTIFF,
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
self.tr('Control whether the created file is a BigTIFF or a classic TIFF'), self.BIGTIFFTYPE, 0))
|
||||
params.append(ParameterBoolean(self.TFW,
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
self.tr('Force the generation of an associated ESRI world file (.tfw))'), False))
|
||||
params.append(ParameterString(self.EXTRA,
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
self.tr('Additional creation parameters'), '', optional=True))
|
||||
|
||||
for param in params:
|
||||
param.isAdvanced = True
|
||||
|
||||
@ -195,7 +195,7 @@ class SagaAlgorithm212(GeoAlgorithm):
|
||||
f.write('\t'.join([col for col in param.cols]) + '\n')
|
||||
values = param.value.split(',')
|
||||
for i in range(0, len(values), 3):
|
||||
s = values[i] + '\t' + values[i + 1] + '\t' + values[i+ 2] + '\n'
|
||||
s = values[i] + '\t' + values[i + 1] + '\t' + values[i + 2] + '\n'
|
||||
f.write(s)
|
||||
f.close()
|
||||
command += ' -' + param.name + ' "' + tempTableFile + '"'
|
||||
|
||||
@ -32,6 +32,7 @@ from PyQt4.QtGui import QIcon
|
||||
from processing.tools.system import tempFolder
|
||||
import processing.tools.dataobjects
|
||||
|
||||
|
||||
class ProcessingConfig:
|
||||
|
||||
OUTPUT_FOLDER = 'OUTPUT_FOLDER'
|
||||
|
||||
@ -31,6 +31,7 @@ from processing.tools.vector import VectorWriter, TableWriter
|
||||
from processing.tools import dataobjects
|
||||
from processing.core.ProcessingConfig import ProcessingConfig
|
||||
|
||||
|
||||
def getOutputFromString(s):
|
||||
tokens = s.split("|")
|
||||
params = [t if unicode(t) != "None" else None for t in tokens[1:]]
|
||||
@ -152,7 +153,6 @@ class OutputRaster(Output):
|
||||
|
||||
compatible = None
|
||||
|
||||
|
||||
def getFileFilter(self, alg):
|
||||
exts = dataobjects.getSupportedOutputRasterLayerExtensions()
|
||||
for i in range(len(exts)):
|
||||
|
||||
@ -213,7 +213,6 @@ class SettingDelegate(QStyledItemDelegate):
|
||||
elif isinstance(value, (str, unicode)):
|
||||
return QLineEdit(parent)
|
||||
|
||||
|
||||
def setEditorData(self, editor, index):
|
||||
value = self.convertValue(index.model().data(index, Qt.EditRole))
|
||||
setting = index.model().data(index, Qt.UserRole)
|
||||
|
||||
@ -389,9 +389,9 @@ def snapToPrecision(geom, precision):
|
||||
i = 0
|
||||
p = snapped.vertexAt(i)
|
||||
while p.x() != 0.0 and p.y() != 0.0:
|
||||
x = round(p.x() / precision,0) * precision
|
||||
y = round(p.y() / precision,0) * precision
|
||||
snapped.moveVertex(x,y,i)
|
||||
x = round(p.x() / precision, 0) * precision
|
||||
y = round(p.y() / precision, 0) * precision
|
||||
snapped.moveVertex(x, y, i)
|
||||
i = i + 1
|
||||
p = snapped.vertexAt(i)
|
||||
return snapped
|
||||
|
||||
@ -114,7 +114,7 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option,
|
||||
index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
|
||||
doc.setTextWidth( width - ( !icon.isNull() ? icon.width() + 35 : 35 ) );
|
||||
|
||||
return QSize( width, qMax( ( double ) doc.size().height() + 10, ( double )icon.height() ) + 20 );
|
||||
return QSize( width, qMax(( double ) doc.size().height() + 10, ( double )icon.height() ) + 20 );
|
||||
}
|
||||
|
||||
QgsWelcomePageItemsModel::QgsWelcomePageItemsModel( QObject* parent )
|
||||
|
||||
@ -1487,7 +1487,7 @@ static QVariant fcnRelate( const QVariantList& values, const QgsExpressionContex
|
||||
QString result = engine->relate( *sGeom.geometry() );
|
||||
delete engine;
|
||||
|
||||
return QVariant::fromValue( result );
|
||||
return QVariant::fromValue( result );
|
||||
}
|
||||
|
||||
static QVariant fcnBbox( const QVariantList& values, const QgsExpressionContext*, QgsExpression* parent )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user