Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more cosmetics
  • Loading branch information
jef-n committed Oct 22, 2011
1 parent d8540c0 commit a2a6e78
Show file tree
Hide file tree
Showing 65 changed files with 155 additions and 142 deletions.
5 changes: 3 additions & 2 deletions src/analysis/interpolation/qgsgridfilewriter.cpp
Expand Up @@ -20,8 +20,9 @@
#include <QFile>
#include <QProgressDialog>

QgsGridFileWriter::QgsGridFileWriter( QgsInterpolator* i, QString outputPath, QgsRectangle extent, int nCols, int nRows , double cellSizeX, double cellSizeY ): \
mInterpolator( i ), mOutputFilePath( outputPath ), mInterpolationExtent( extent ), mNumColumns( nCols ), mNumRows( nRows ), mCellSizeX( cellSizeX ), mCellSizeY( cellSizeY )
QgsGridFileWriter::QgsGridFileWriter( QgsInterpolator* i, QString outputPath, QgsRectangle extent, int nCols, int nRows , double cellSizeX, double cellSizeY )
: mInterpolator( i ), mOutputFilePath( outputPath ), mInterpolationExtent( extent ), mNumColumns( nCols ), mNumRows( nRows )
, mCellSizeX( cellSizeX ), mCellSizeY( cellSizeY )
{

}
Expand Down
7 changes: 4 additions & 3 deletions src/analysis/raster/qgsaspectfilter.h
Expand Up @@ -29,10 +29,11 @@ class ANALYSIS_EXPORT QgsAspectFilter: public QgsDerivativeFilter

protected:
protected:
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
/**Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 );
};

#endif // QGSASPECTFILTER_H
4 changes: 2 additions & 2 deletions src/analysis/raster/qgsderivativefilter.cpp
Expand Up @@ -17,8 +17,8 @@

#include "qgsderivativefilter.h"

QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
QgsNineCellFilter( inputFile, outputFile, outputFormat )
QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
: QgsNineCellFilter( inputFile, outputFile, outputFormat )
{

}
Expand Down
5 changes: 3 additions & 2 deletions src/analysis/raster/qgsderivativefilter.h
Expand Up @@ -27,8 +27,9 @@ class QgsDerivativeFilter: public QgsNineCellFilter
QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
virtual ~QgsDerivativeFilter();
//to be implemented by subclasses
virtual float processNineCellWindow( float* x11, float* x21, float* x31, float* x12, float* x22, \
float* x32, float* x13, float* x23, float* x33 ) = 0;
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 ) = 0;

protected:
/**Calculates the first order derivative in x-direction according to Horn (1981)*/
Expand Down
10 changes: 5 additions & 5 deletions src/analysis/raster/qgsninecellfilter.cpp
Expand Up @@ -25,8 +25,8 @@
#define TO8(x) (x).toLocal8Bit().constData()
#endif

QgsNineCellFilter::QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
mInputFile( inputFile ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), mCellSizeX( -1 ), mCellSizeY( -1 ), mInputNodataValue( -1 ), mOutputNodataValue( -1 )
QgsNineCellFilter::QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
: mInputFile( inputFile ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), mCellSizeX( -1 ), mCellSizeY( -1 ), mInputNodataValue( -1 ), mOutputNodataValue( -1 )
{

}
Expand Down Expand Up @@ -153,17 +153,17 @@ int QgsNineCellFilter::processRaster( QProgressDialog* p )
{
if ( j == 0 )
{
resultLine[j] = processNineCellWindow( &mInputNodataValue, &scanLine1[j], &scanLine1[j+1], &mInputNodataValue, &scanLine2[j], \
resultLine[j] = processNineCellWindow( &mInputNodataValue, &scanLine1[j], &scanLine1[j+1], &mInputNodataValue, &scanLine2[j],
&scanLine2[j+1], &mInputNodataValue, &scanLine3[j], &scanLine3[j+1] );
}
else if ( j == xSize - 1 )
{
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &mInputNodataValue, &scanLine2[j-1], &scanLine2[j], \
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &mInputNodataValue, &scanLine2[j-1], &scanLine2[j],
&mInputNodataValue, &scanLine3[j-1], &scanLine3[j], &mInputNodataValue );
}
else
{
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &scanLine1[j+1], &scanLine2[j-1], &scanLine2[j], \
resultLine[j] = processNineCellWindow( &scanLine1[j-1], &scanLine1[j], &scanLine1[j+1], &scanLine2[j-1], &scanLine2[j],
&scanLine2[j+1], &scanLine3[j-1], &scanLine3[j], &scanLine3[j+1] );
}
}
Expand Down
11 changes: 6 additions & 5 deletions src/analysis/raster/qgsninecellfilter.h
Expand Up @@ -23,8 +23,8 @@

class QProgressDialog;

/**Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of each cell based on \
the cell value and the eight neighbour cells. Common examples are slope and aspect calculation in DEMs. Subclasses only implement \
/**Base class for raster analysis methods that work with a 3x3 cell filter and calculate the value of each cell based on
the cell value and the eight neighbour cells. Common examples are slope and aspect calculation in DEMs. Subclasses only implement
the method that calculates the new value from the nine values. Everything else (reading file, writing file) is done by this subclass*/

class ANALYSIS_EXPORT QgsNineCellFilter
Expand Down Expand Up @@ -52,10 +52,11 @@ class ANALYSIS_EXPORT QgsNineCellFilter
GDALDatasetH openOutputFile( GDALDatasetH inputDataset, GDALDriverH outputDriver );

protected:
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
/**Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
virtual float processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 ) = 0;
virtual float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 ) = 0;

QString mInputFile;
QString mOutputFile;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/raster/qgsruggednessfilter.cpp
Expand Up @@ -33,7 +33,7 @@ QgsRuggednessFilter::~QgsRuggednessFilter()

}

float QgsRuggednessFilter::processNineCellWindow( float* x11, float* x21, float* x31, \
float QgsRuggednessFilter::processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
{
//the formula would be that easy without nodata values...
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/raster/qgsruggednessfilter.h
Expand Up @@ -29,7 +29,7 @@ class ANALYSIS_EXPORT QgsRuggednessFilter: public QgsNineCellFilter
~QgsRuggednessFilter();

protected:
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
/**Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
Expand Down
6 changes: 3 additions & 3 deletions src/analysis/raster/qgsslopefilter.cpp
Expand Up @@ -17,8 +17,8 @@

#include "qgsslopefilter.h"

QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
QgsDerivativeFilter( inputFile, outputFile, outputFormat )
QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
: QgsDerivativeFilter( inputFile, outputFile, outputFormat )
{

}
Expand All @@ -28,7 +28,7 @@ QgsSlopeFilter::~QgsSlopeFilter()

}

float QgsSlopeFilter::processNineCellWindow( float* x11, float* x21, float* x31, \
float QgsSlopeFilter::processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 )
{
float derX = calcFirstDerX( x11, x21, x31, x12, x22, x32, x13, x23, x33 );
Expand Down
7 changes: 4 additions & 3 deletions src/analysis/raster/qgsslopefilter.h
Expand Up @@ -28,10 +28,11 @@ class ANALYSIS_EXPORT QgsSlopeFilter: public QgsDerivativeFilter
~QgsSlopeFilter();

protected:
/**Calculates output value from nine input values. The input values and the output value can be equal to the \
/**Calculates output value from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 );
};

#endif // QGSSLOPEFILTER_H
10 changes: 5 additions & 5 deletions src/analysis/raster/qgstotalcurvaturefilter.cpp
Expand Up @@ -17,8 +17,8 @@

#include "qgstotalcurvaturefilter.h"

QgsTotalCurvatureFilter::QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \
QgsNineCellFilter( inputFile, outputFile, outputFormat )
QgsTotalCurvatureFilter::QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat )
: QgsNineCellFilter( inputFile, outputFile, outputFormat )
{

}
Expand All @@ -28,12 +28,12 @@ QgsTotalCurvatureFilter::~QgsTotalCurvatureFilter()

}

float QgsTotalCurvatureFilter::processNineCellWindow( float* x11, float* x21, float* x31, float* x12, \
float QgsTotalCurvatureFilter::processNineCellWindow( float* x11, float* x21, float* x31, float* x12,
float* x22, float* x32, float* x13, float* x23, float* x33 )
{
//return nodata if one value is the nodata value
if ( *x11 == mInputNodataValue || *x21 == mInputNodataValue || *x31 == mInputNodataValue || *x12 == mInputNodataValue \
|| *x22 == mInputNodataValue || *x32 == mInputNodataValue || *x13 == mInputNodataValue || *x23 == mInputNodataValue \
if ( *x11 == mInputNodataValue || *x21 == mInputNodataValue || *x31 == mInputNodataValue || *x12 == mInputNodataValue
|| *x22 == mInputNodataValue || *x32 == mInputNodataValue || *x13 == mInputNodataValue || *x23 == mInputNodataValue
|| *x33 == mInputNodataValue )
{
return mOutputNodataValue;
Expand Down
7 changes: 4 additions & 3 deletions src/analysis/raster/qgstotalcurvaturefilter.h
Expand Up @@ -28,10 +28,11 @@ class ANALYSIS_EXPORT QgsTotalCurvatureFilter: public QgsNineCellFilter
~QgsTotalCurvatureFilter();

protected:
/**Calculates total curvature from nine input values. The input values and the output value can be equal to the \
/**Calculates total curvature from nine input values. The input values and the output value can be equal to the
nodata value if not present or outside of the border. Must be implemented by subclasses*/
float processNineCellWindow( float* x11, float* x21, float* x31, \
float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 );
float processNineCellWindow( float* x11, float* x21, float* x31,
float* x12, float* x22, float* x32,
float* x13, float* x23, float* x33 );
};

#endif // QGSTOTALCURVATUREFILTER_H
4 changes: 2 additions & 2 deletions src/analysis/vector/qgsoverlayanalyzer.h
Expand Up @@ -45,8 +45,8 @@ class ANALYSIS_EXPORT QgsOverlayAnalyzer
@param onlySelectedFeatures if true, only selected features are considered, else all the features
@param p progress dialog (or 0 if no progress dialog is to be shown)
@note: added in version 1.4*/
bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB, \
const QString& shapefileName, bool onlySelectedFeatures = false, \
bool intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 );

#if 0
Expand Down
6 changes: 3 additions & 3 deletions src/analysis/vector/qgszonalstatistics.h
Expand Up @@ -44,14 +44,14 @@ class ANALYSIS_EXPORT QgsZonalStatistics
int& offsetX, int& offsetY, int& nCellsX, int& nCellsY ) const;

/**Returns statistics by considering the pixels where the center point is within the polygon (fast)*/
void statisticsFromMiddlePointTest( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY, \
void statisticsFromMiddlePointTest( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY,
double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count );

void statisticsFromMiddlePointTest_improved( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY, \
void statisticsFromMiddlePointTest_improved( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY,
double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count );

/**Returns statistics with precise pixel - polygon intersection test (slow) */
void statisticsFromPreciseIntersection( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY, \
void statisticsFromPreciseIntersection( void* band, QgsGeometry* poly, int pixelOffsetX, int pixelOffsetY, int nCellsX, int nCellsY,
double cellSizeX, double cellSizeY, const QgsRectangle& rasterBBox, double& sum, double& count );


Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposermanager.h
Expand Up @@ -22,7 +22,7 @@
class QListWidgetItem;
class QgsComposer;

/**A dialog that shows the existing composer instances. Lets the user add new \
/**A dialog that shows the existing composer instances. Lets the user add new
instances and change title of existing ones*/
class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -3517,7 +3517,7 @@ QgsGeometry* QgisApp::unionGeometries( const QgsVectorLayer* vl, QgsFeatureList&

//convert unionGeom to a multipart geometry in case it is necessary to match the layer type
QGis::WkbType t = vl->wkbType();
bool layerIsMultiType = ( t == QGis::WKBMultiPoint || t == QGis::WKBMultiPoint25D || t == QGis::WKBMultiLineString \
bool layerIsMultiType = ( t == QGis::WKBMultiPoint || t == QGis::WKBMultiPoint25D || t == QGis::WKBMultiLineString
|| t == QGis::WKBMultiLineString25D || t == QGis::WKBMultiPolygon || t == QGis::WKBMultiPoint25D );
if ( layerIsMultiType && !unionGeom->isMultipart() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsdecorationscalebardialog.cpp
Expand Up @@ -42,7 +42,7 @@ QgsDecorationScaleBarDialog::QgsDecorationScaleBarDialog( QgsDecorationScaleBar&
spnSize->setValue( mDeco.mPreferredSize );

chkSnapping->setChecked( mDeco.mSnapping );
\

cboPlacement->clear();
cboPlacement->addItems( mDeco.mPlacementLabels );
cboPlacement->setCurrentIndex( mDeco.mPlacementIndex );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsfieldcalculator.cpp
Expand Up @@ -476,7 +476,7 @@ void QgsFieldCalculator::getFieldValues( int limit )
void QgsFieldCalculator::setOkButtonState()
{
bool okEnabled = true;
if (( mOutputFieldNameLineEdit->text().isEmpty() && mUpdateExistingFieldCheckBox->checkState() == Qt::Unchecked )\
if (( mOutputFieldNameLineEdit->text().isEmpty() && mUpdateExistingFieldCheckBox->checkState() == Qt::Unchecked )
|| mExpressionTextEdit->toPlainText().isEmpty() )
{
okEnabled = false;
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsformannotationdialog.cpp
Expand Up @@ -5,8 +5,8 @@
#include <QFileInfo>
#include <QGraphicsScene>

QgsFormAnnotationDialog::QgsFormAnnotationDialog( QgsFormAnnotationItem* item, QWidget * parent, Qt::WindowFlags f ): \
QDialog( parent, f ), mItem( item ), mEmbeddedWidget( 0 )
QgsFormAnnotationDialog::QgsFormAnnotationDialog( QgsFormAnnotationItem* item, QWidget * parent, Qt::WindowFlags f )
: QDialog( parent, f ), mItem( item ), mEmbeddedWidget( 0 )
{
setupUi( this );
mEmbeddedWidget = new QgsAnnotationWidget( mItem );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptooladdvertex.cpp
Expand Up @@ -104,8 +104,8 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
for ( ; filterIt != filteredSnapResults.end(); ++filterIt )
{
if ( filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
if ( filterIt->snappedAtGeometry == recentIt->snappedAtGeometry
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
{
filteredSnapResults.erase( filterIt );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatepointsymbols.h
Expand Up @@ -36,7 +36,7 @@ class QgsMapToolRotatePointSymbols: public QgsMapToolEdit

bool isEditTool() {return true;}

/**Returns true if the symbols of a maplayer can be rotated. This means the layer \
/**Returns true if the symbols of a maplayer can be rotated. This means the layer
is a vector layer, has type point or multipoint and has at least one rotation attribute in the renderer*/
static bool layerIsRotatable( QgsMapLayer* ml );

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgspointrotationitem.h
Expand Up @@ -39,7 +39,7 @@ class QgsPointRotationItem: public QgsMapCanvasItem
/**Sets the center point of the rotation symbol (in map coordinates)*/
void setPointLocation( const QgsPoint& p );

/**Sets the rotation of the symbol and displays the new rotation number. \
/**Sets the rotation of the symbol and displays the new rotation number.
Units are degrees, starting from north direction, clockwise direction*/
void setSymbolRotation( int r ) {mRotation = r;}

Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposerarrow.cpp
Expand Up @@ -260,7 +260,7 @@ void QgsComposerArrow::setArrowHeadWidth( double width )
void QgsComposerArrow::adaptItemSceneRect()
{
//rectangle containing start and end point
QRectF rect = QRectF( qMin( mStartPoint.x(), mStopPoint.x() ), qMin( mStartPoint.y(), mStopPoint.y() ), \
QRectF rect = QRectF( qMin( mStartPoint.x(), mStopPoint.x() ), qMin( mStartPoint.y(), mStopPoint.y() ),
qAbs( mStopPoint.x() - mStartPoint.x() ), qAbs( mStopPoint.y() - mStartPoint.y() ) );
double enlarge = 0;
if ( mMarkerMode == DefaultMarker )
Expand Down
3 changes: 2 additions & 1 deletion src/core/composer/qgscomposerattributetable.cpp
Expand Up @@ -43,7 +43,8 @@ bool QgsComposerAttributeTableCompare::operator()( const QgsAttributeMap& m1, co
}


QgsComposerAttributeTable::QgsComposerAttributeTable( QgsComposition* composition ): QgsComposerTable( composition ), mVectorLayer( 0 ), mComposerMap( 0 ), \
QgsComposerAttributeTable::QgsComposerAttributeTable( QgsComposition* composition )
: QgsComposerTable( composition ), mVectorLayer( 0 ), mComposerMap( 0 ),
mMaximumNumberOfFeatures( 5 ), mShowOnlyVisibleFeatures( true )
{
//set first vector layer from layer registry as default one
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposeritem.h
Expand Up @@ -296,7 +296,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
double angle( const QPointF& p1, const QPointF& p2 ) const;

/**Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the \
/**Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the
item border for resizing*/
double rectHandlerBorderTolerance() const;

Expand Down

0 comments on commit a2a6e78

Please sign in to comment.