Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Oct 24, 2011
2 parents 513f1c3 + 1a1f5eb commit 0d79669
Show file tree
Hide file tree
Showing 94 changed files with 2,462 additions and 835 deletions.
1,168 changes: 657 additions & 511 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ms-windows/osgeo4w/package-nightly.cmd
@@ -1,5 +1,5 @@
@echo off
set GRASS_VERSION=6.4.1
set GRASS_VERSION=6.4.2RC1

set BUILDDIR=%CD%\build
REM set BUILDDIR=%TEMP%\qgis_unstable
Expand Down
2 changes: 1 addition & 1 deletion ms-windows/osgeo4w/package.cmd
@@ -1,5 +1,5 @@
@echo off
set GRASS_VERSION=6.4.1
set GRASS_VERSION=6.4.2RC2

set BUILDDIR=%CD%\build
REM set BUILDDIR=%TEMP%\qgis_unstable
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/interpolation/DualEdgeTriangulation.cc
Expand Up @@ -2939,11 +2939,11 @@ bool DualEdgeTriangulation::saveToTAFF( QString filename ) const

//export the points to the file
outstream << "POIN" << std::endl << std::flush;
outstream << "NPTS " << this->getNumberOfPoints() << std::endl << std::flush;
outstream << "NPTS " << getNumberOfPoints() << std::endl << std::flush;
outstream << "PATT 3" << std::endl << std::flush;
outstream << "DATA ";

for ( int i = 0; i < this->getNumberOfPoints(); i++ )
for ( int i = 0; i < getNumberOfPoints(); i++ )
{
Point3D* p = mPointVector[i];
outstream << p->getX() << " " << p->getY() << " " << p->getZ() << " ";
Expand Down
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
10 changes: 5 additions & 5 deletions src/app/composer/qgscomposerarrowwidget.cpp
Expand Up @@ -184,13 +184,13 @@ void QgsComposerArrowWidget::on_mSvgMarkerRadioButton_toggled( bool toggled )
}
}

void QgsComposerArrowWidget::on_mStartMarkerLineEdit_editingFinished( const QString & text )
void QgsComposerArrowWidget::on_mStartMarkerLineEdit_textChanged( const QString & text )
{
if ( mArrow )
{
mArrow->beginCommand( tr( "Arrow start marker" ) );
QFileInfo fi( text );
if ( fi.exists() )
if ( fi.exists() && fi.isFile() )
{
mArrow->setStartMarker( text );
}
Expand All @@ -203,13 +203,13 @@ void QgsComposerArrowWidget::on_mStartMarkerLineEdit_editingFinished( const QStr
}
}

void QgsComposerArrowWidget::on_mEndMarkerLineEdit_editingFinished( const QString & text )
void QgsComposerArrowWidget::on_mEndMarkerLineEdit_textChanged( const QString & text )
{
if ( mArrow )
{
mArrow->beginCommand( tr( "Arrow start marker" ) );
mArrow->beginCommand( tr( "Arrow end marker" ) );
QFileInfo fi( text );
if ( fi.exists() )
if ( fi.exists() && fi.isFile() )
{
mArrow->setEndMarker( text );
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgscomposerarrowwidget.h
Expand Up @@ -46,8 +46,8 @@ class QgsComposerArrowWidget: public QWidget, private Ui::QgsComposerArrowWidget
void on_mDefaultMarkerRadioButton_toggled( bool toggled );
void on_mNoMarkerRadioButton_toggled( bool toggled );
void on_mSvgMarkerRadioButton_toggled( bool toggled );
void on_mStartMarkerLineEdit_editingFinished( const QString & text );
void on_mEndMarkerLineEdit_editingFinished( const QString & text );
void on_mStartMarkerLineEdit_textChanged( const QString & text );
void on_mEndMarkerLineEdit_textChanged( const QString & text );
void on_mStartMarkerToolButton_clicked();
void on_mEndMarkerToolButton_clicked();

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

0 comments on commit 0d79669

Please sign in to comment.