Skip to content
Permalink
Browse files

indentation fixes

  • Loading branch information
jef-n committed Dec 26, 2016
1 parent e5a4426 commit 8fb37aa66652ad3f3fccd2cb09726d3c9f7f0ee8
@@ -33,15 +33,15 @@
from qgis.analysis import (QgsInterpolator,
QgsIDWInterpolator,
QgsGridFileWriter
)
)

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.parameters import (Parameter,
ParameterNumber,
ParameterExtent,
_splitParameterOptions
)
)
from processing.core.outputs import OutputRaster
from processing.tools import dataobjects

@@ -82,8 +82,8 @@ def setValue(self, value):
return True

if value == '':
if not self.optional:
return False
if not self.optional:
return False

if isinstance(value, str):
self.value = value if value != '' else None
@@ -103,7 +103,7 @@ def getAsScriptCode(self):
def fromScriptCode(self, line):
isOptional, name, definition = _splitParameterOptions(line)
descName = _createDescriptiveName(name)
parent = definition.lower().strip()[len('interpolation data') + 1:]
parent = definition.lower().strip()[len('interpolation data') + 1:]
return ParameterInterpolationData(name, description, parent)

@staticmethod
@@ -33,7 +33,7 @@
from qgis.analysis import (QgsInterpolator,
QgsTINInterpolator,
QgsGridFileWriter
)
)

from processing.core.GeoAlgorithm import GeoAlgorithm
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
@@ -42,10 +42,10 @@
ParameterExtent,
ParameterSelection,
_splitParameterOptions
)
)
from processing.core.outputs import (OutputRaster,
OutputVector
)
)
from processing.tools import dataobjects

pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
@@ -90,8 +90,8 @@ def setValue(self, value):
return True

if value == '':
if not self.optional:
return False
if not self.optional:
return False

if isinstance(value, str):
self.value = value if value != '' else None
@@ -111,7 +111,7 @@ def getAsScriptCode(self):
def fromScriptCode(self, line):
isOptional, name, definition = _splitParameterOptions(line)
descName = _createDescriptiveName(name)
parent = definition.lower().strip()[len('interpolation data') + 1:]
parent = definition.lower().strip()[len('interpolation data') + 1:]
return ParameterInterpolationData(name, description, parent)

@staticmethod
@@ -34,12 +34,12 @@
QColor)
from qgis.PyQt.QtWidgets import (QTreeWidgetItem,
QComboBox
)
)
from qgis.core import (QgsApplication,
QgsMapLayer,
QgsMapLayerProxyModel,
QgsWkbTypes
)
)
from qgis.gui import QgsFieldProxyModel
from qgis.analysis import QgsInterpolator

@@ -103,15 +103,15 @@ def on_cmbLayers_layerChanged(self, layer):

def addLayerData(self, layerName, attribute):
item = QTreeWidgetItem()
item.setText(0, layerName);
item.setText(0, layerName)
item.setText(1, attribute)
self.layersTree.addTopLevelItem(item)

comboBox = QComboBox()
comboBox.addItem(self.tr('Points'))
comboBox.addItem(self.tr('Structure lines'))
comboBox.addItem(self.tr('Break lines'))
comboBox.setCurrentIndex( 0 )
comboBox.setCurrentIndex(0)
self.layersTree.setItemWidget(item, 2, comboBox)

def setValue(self, value):
@@ -156,9 +156,9 @@ def value(self):
inputType = QgsInterpolator.BREAK_LINES

layers += '{},{},{:d},{:d};'.format(layer.source(),
zCoord,
fieldIndex,
inputType)
zCoord,
fieldIndex,
inputType)
return layers[:-1]


@@ -38,7 +38,7 @@
QMessageBox,
QInputDialog,
QColorDialog
)
)
from qgis.PyQt.QtXml import QDomDocument

from qgis.core import QgsApplication, QgsMapLayer
@@ -68,33 +68,33 @@ namespace DRW
//! Version numbers for the DXF Format.
enum Version
{
UNKNOWNV, /*!< UNKNOWN VERSION. */
AC1006, /*!< R10. */
AC1009, /*!< R11 & R12. */
AC1012, /*!< R13. */
AC1014, /*!< R14. */
AC1015, /*!< ACAD 2000. */
AC1018, /*!< ACAD 2004. */
AC1021, /*!< ACAD 2007. */
AC1024, /*!< ACAD 2010. */
AC1027 /*!< ACAD 2013. */
UNKNOWNV, //!< UNKNOWN VERSION.
AC1006, //!< R10.
AC1009, //!< R11 & R12.
AC1012, //!< R13.
AC1014, //!< R14.
AC1015, //!< ACAD 2000.
AC1018, //!< ACAD 2004.
AC1021, //!< ACAD 2007.
AC1024, //!< ACAD 2010.
AC1027 //!< ACAD 2013.
};

enum error
{
BAD_NONE, /*!< No error. */
BAD_UNKNOWN, /*!< UNKNOWN. */
BAD_OPEN, /*!< error opening file. */
BAD_VERSION, /*!< unsupported version. */
BAD_READ_METADATA, /*!< error reading matadata. */
BAD_READ_FILE_HEADER, /*!< error in file header read process. */
BAD_READ_HEADER, /*!< error in header vars read process. */
BAD_READ_HANDLES, /*!< error in object map read process. */
BAD_READ_CLASSES, /*!< error in classes read process. */
BAD_READ_TABLES, /*!< error in tables read process. */
BAD_READ_BLOCKS, /*!< error in block read process. */
BAD_READ_ENTITIES, /*!< error in entities read process. */
BAD_READ_OBJECTS /*!< error in objects read process. */
BAD_NONE, //!< No error.
BAD_UNKNOWN, //!< UNKNOWN.
BAD_OPEN, //!< Error opening file.
BAD_VERSION, //!< Unsupported version.
BAD_READ_METADATA, //!< Error reading matadata.
BAD_READ_FILE_HEADER, //!< Error in file header read process.
BAD_READ_HEADER, //!< Error in header vars read process.
BAD_READ_HANDLES, //!< Error in object map read process.
BAD_READ_CLASSES, //!< Error in classes read process.
BAD_READ_TABLES, //!< Error in tables read process.
BAD_READ_BLOCKS, //!< Error in block read process.
BAD_READ_ENTITIES, //!< Error in entities read process.
BAD_READ_OBJECTS //!< Error in objects read process.
};

enum DBG_LEVEL
@@ -171,7 +171,7 @@ class DRW_Coord
z = data.z;
return *this;
}
/** < convert to unitary vector */
//! < convert to unitary vector
void unitize()
{
double dist;
@@ -204,11 +204,11 @@ class DRW_Vertex2D
DRW_Vertex2D( double sx, double sy, double b ): x( sx ), y( sy ), stawidth( 0 ), endwidth( 0 ), bulge( b ) {}

public:
double x; /*!< x coordinate, code 10 */
double y; /*!< y coordinate, code 20 */
double stawidth; /*!< Start width, code 40 */
double endwidth; /*!< End width, code 41 */
double bulge; /*!< bulge, code 42 */
double x; //!< X coordinate, code 10
double y; //!< Y coordinate, code 20
double stawidth; //!< Start width, code 40
double endwidth; //!< End width, code 41
double bulge; //!< Bulge, code 42
};


@@ -261,7 +261,7 @@ class DRW_Variant
void setCoordY( double d ) { if ( vType == COORD ) vdata.y = d;}
void setCoordZ( double d ) { if ( vType == COORD ) vdata.z = d;}
enum TYPE type() { return vType;}
int code() { return vCode;} /*!< returns dxf code of this value*/
int code() { return vCode;} //!< Returns dxf code of this value

private:
std::string sdata;
@@ -285,7 +285,7 @@ class DRW_Variant
DRW_VarContent content;
private:
enum TYPE vType;
int vCode; /*!< dxf code of this value*/
int vCode; //!< Dxf code of this value

};

@@ -317,33 +317,33 @@ class DRW_LW_Conv
public:
enum lineWidth
{
width00 = 0, /*!< 0.00mm (dxf 0)*/
width01 = 1, /*!< 0.05mm (dxf 5)*/
width02 = 2, /*!< 0.09mm (dxf 9)*/
width03 = 3, /*!< 0.13mm (dxf 13)*/
width04 = 4, /*!< 0.15mm (dxf 15)*/
width05 = 5, /*!< 0.18mm (dxf 18)*/
width06 = 6, /*!< 0.20mm (dxf 20)*/
width07 = 7, /*!< 0.25mm (dxf 25)*/
width08 = 8, /*!< 0.30mm (dxf 30)*/
width09 = 9, /*!< 0.35mm (dxf 35)*/
width10 = 10, /*!< 0.40mm (dxf 40)*/
width11 = 11, /*!< 0.50mm (dxf 50)*/
width12 = 12, /*!< 0.53mm (dxf 53)*/
width13 = 13, /*!< 0.60mm (dxf 60)*/
width14 = 14, /*!< 0.70mm (dxf 70)*/
width15 = 15, /*!< 0.80mm (dxf 80)*/
width16 = 16, /*!< 0.90mm (dxf 90)*/
width17 = 17, /*!< 1.00mm (dxf 100)*/
width18 = 18, /*!< 1.06mm (dxf 106)*/
width19 = 19, /*!< 1.20mm (dxf 120)*/
width20 = 20, /*!< 1.40mm (dxf 140)*/
width21 = 21, /*!< 1.58mm (dxf 158)*/
width22 = 22, /*!< 2.00mm (dxf 200)*/
width23 = 23, /*!< 2.11mm (dxf 211)*/
widthByLayer = 29, /*!< by layer (dxf -1) */
widthByBlock = 30, /*!< by block (dxf -2) */
widthDefault = 31 /*!< by default (dxf -3) */
width00 = 0, //!< 0.00mm (dxf 0)
width01 = 1, //!< 0.05mm (dxf 5)
width02 = 2, //!< 0.09mm (dxf 9)
width03 = 3, //!< 0.13mm (dxf 13)
width04 = 4, //!< 0.15mm (dxf 15)
width05 = 5, //!< 0.18mm (dxf 18)
width06 = 6, //!< 0.20mm (dxf 20)
width07 = 7, //!< 0.25mm (dxf 25)
width08 = 8, //!< 0.30mm (dxf 30)
width09 = 9, //!< 0.35mm (dxf 35)
width10 = 10, //!< 0.40mm (dxf 40)
width11 = 11, //!< 0.50mm (dxf 50)
width12 = 12, //!< 0.53mm (dxf 53)
width13 = 13, //!< 0.60mm (dxf 60)
width14 = 14, //!< 0.70mm (dxf 70)
width15 = 15, //!< 0.80mm (dxf 80)
width16 = 16, //!< 0.90mm (dxf 90)
width17 = 17, //!< 1.00mm (dxf 100)
width18 = 18, //!< 1.06mm (dxf 106)
width19 = 19, //!< 1.20mm (dxf 120)
width20 = 20, //!< 1.40mm (dxf 140)
width21 = 21, //!< 1.58mm (dxf 158)
width22 = 22, //!< 2.00mm (dxf 200)
width23 = 23, //!< 2.11mm (dxf 211)
widthByLayer = 29, //!< By layer (dxf -1)
widthByBlock = 30, //!< By block (dxf -2)
widthDefault = 31 //!< By default (dxf -3)
};

static int lineWidth2dxfInt( enum lineWidth lw )
@@ -48,13 +48,13 @@ class DRW_Class
private:
void toDwgType();
public:
UTF8STRING recName; /*!< record name, code 1 */
UTF8STRING className; /*!< C++ class name, code 2 */
UTF8STRING appName; /*!< app name, code 3 */
int proxyFlag; /*!< Proxy capabilities flag, code 90 */
int instanceCount; /*!< number of instances for a custom class, code 91*/
int wasaProxyFlag; /*!< proxy flag (app loaded on save), code 280 */
int entityFlag; /*!< entity flag, code 281 (0 object, 1 entity)*/
UTF8STRING recName; //!< Record name, code 1
UTF8STRING className; //!< C++ class name, code 2
UTF8STRING appName; //!< App name, code 3
int proxyFlag; //!< Proxy capabilities flag, code 90
int instanceCount; //!< Number of instances for a custom class, code 91
int wasaProxyFlag; //!< Proxy flag (app loaded on save), code 280
int entityFlag; //!< Entity flag, code 281 (0 object, 1 entity)
public: //only for read dwg
duint16 classNum;
int dwgType;

0 comments on commit 8fb37aa

Please sign in to comment.
You can’t perform that action at this time.