Skip to content

Commit

Permalink
automatic indentation update (r9447-r9517)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9518 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 22, 2008
1 parent cbfb72e commit 94b31cb
Show file tree
Hide file tree
Showing 26 changed files with 329 additions and 329 deletions.
6 changes: 3 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -4187,8 +4187,8 @@ void QgisApp::loadPythonSupport()

if ( mPythonUtils && mPythonUtils->isEnabled() )
{
QgsPluginRegistry::instance()->setPythonUtils(mPythonUtils);
QgsPluginRegistry::instance()->setPythonUtils( mPythonUtils );

mActionShowPythonDialog = new QAction( tr( "Python Console" ), this );
connect( mActionShowPythonDialog, SIGNAL( triggered() ), this, SLOT( showPythonDialog() ) );

Expand Down Expand Up @@ -5224,7 +5224,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )

//NOTE: This check does not really add any protection, as it is called on load not on layer select/activate
//If you load a layer with a provider and idenitfy ability then load another without, the tool would be disabled for both

//Enable the Identify tool ( GDAL datasets draw without a provider )
//but turn off if data provider exists and has no Identify capabilities
mActionIdentify->setEnabled( true );
Expand Down
14 changes: 7 additions & 7 deletions src/app/qgsgraduatedsymboldialog.cpp
Expand Up @@ -297,8 +297,8 @@ void QgsGraduatedSymbolDialog::adjustClassification()

if ( provider )
{
if ( modeComboBox->currentText() == tr( "Equal Interval" ) ||
modeComboBox->currentText() == tr( "Quantiles" ) )
if ( modeComboBox->currentText() == tr( "Equal Interval" ) ||
modeComboBox->currentText() == tr( "Quantiles" ) )
{
minimum = provider->minimumValue( field ).toDouble();
maximum = provider->maximumValue( field ).toDouble();
Expand Down Expand Up @@ -590,11 +590,11 @@ void QgsGraduatedSymbolDialog::updateEntryIcon( QgsSymbol * thepSymbol,
switch ( myType )
{
case QGis::Point:
{
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
}
break;
{
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
}
break;
case QGis::Line:
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getLineSymbolAsImage() ) ) );
break;
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsmaptooladdvertex.cpp
Expand Up @@ -95,9 +95,9 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
//add segment points in case of topological editing
int topologicalEditing = QgsProject::instance()->readNumEntry( "Digitizing", "/TopologicalEditing", 0 );
if ( topologicalEditing )
{
insertSegmentVerticesForSnap( snapResults, vlayer );
}
{
insertSegmentVerticesForSnap( snapResults, vlayer );
}

snappedPointMapCoord = snapPointFromResults( snapResults, e->pos() );
snappedPointLayerCoord = toLayerCoordinates( vlayer, snappedPointMapCoord );
Expand Down
8 changes: 4 additions & 4 deletions src/app/qgsmaptoolsplitfeatures.cpp
Expand Up @@ -80,10 +80,10 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent( QMouseEvent * e )
//bring up dialog if a split was not possible (polygon) or only done once (line)
int topologicalEditing = QgsProject::instance()->readNumEntry( "Digitizing", "/TopologicalEditing", 0 );
int returnCode = vlayer->splitFeatures( mCaptureList, topologicalEditing );
if(returnCode == 4)
{
QMessageBox::warning(0, tr("No feature split done"), tr("If there are selected features, the split tool only applies to the selected ones. If you like to split all features under the split line, clear the selection"));
}
if ( returnCode == 4 )
{
QMessageBox::warning( 0, tr( "No feature split done" ), tr( "If there are selected features, the split tool only applies to the selected ones. If you like to split all features under the split line, clear the selection" ) );
}
else if ( returnCode != 0 )
{
//several intersections but only one split (most likely line)
Expand Down
14 changes: 7 additions & 7 deletions src/app/qgspluginregistry.cpp
Expand Up @@ -34,12 +34,12 @@ QgsPluginRegistry *QgsPluginRegistry::instance()
}

QgsPluginRegistry::QgsPluginRegistry()
: mPythonUtils(NULL)
: mPythonUtils( NULL )
{
// constructor does nothing
}

void QgsPluginRegistry::setPythonUtils(QgsPythonUtils* pythonUtils)
void QgsPluginRegistry::setPythonUtils( QgsPythonUtils* pythonUtils )
{
mPythonUtils = pythonUtils;
}
Expand Down Expand Up @@ -102,19 +102,19 @@ void QgsPluginRegistry::unloadAll()
it != plugins.end();
it++ )
{
if (isPythonPlugin(it->second->name()))
if ( isPythonPlugin( it->second->name() ) )
{
if (mPythonUtils)
mPythonUtils->unloadPlugin(it->second->library());
if ( mPythonUtils )
mPythonUtils->unloadPlugin( it->second->library() );
else
QgsDebugMsg("warning: python utils is NULL");
QgsDebugMsg( "warning: python utils is NULL" );
}
else
{
if ( it->second->plugin() )
it->second->plugin()->unload();
else
QgsDebugMsg("warning: plugin is NULL:" + it->second->name());
QgsDebugMsg( "warning: plugin is NULL:" + it->second->name() );
}
}
}
2 changes: 1 addition & 1 deletion src/app/qgspluginregistry.h
Expand Up @@ -51,7 +51,7 @@ class QgsPluginRegistry
//! Unload plugins
void unloadAll();
//! Save pointer for python utils (needed for unloading python plugins)
void setPythonUtils(QgsPythonUtils* pythonUtils);
void setPythonUtils( QgsPythonUtils* pythonUtils );
protected:
//! protected constructor
QgsPluginRegistry();
Expand Down
10 changes: 5 additions & 5 deletions src/app/qgsuniquevaluedialog.cpp
Expand Up @@ -438,11 +438,11 @@ void QgsUniqueValueDialog::updateEntryIcon( QgsSymbol * thepSymbol,
switch ( myType )
{
case QGis::Point:
{
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
}
break;
{
int myWidthScale = 4; //magick no to try to make vector props dialog preview look same as legend
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getPointSymbolAsImage( myWidthScale ) ) ) );
}
break;
case QGis::Line:
thepItem->setIcon( QIcon( QPixmap::fromImage( thepSymbol->getLineSymbolAsImage() ) ) );
break;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -180,8 +180,8 @@ bool QgsCoordinateReferenceSystem::createFromEpsg( long id )

bool QgsCoordinateReferenceSystem::createFromSrsId( long id )
{
return loadFromDb( id < 100000 ? QgsApplication::srsDbFilePath() :
QgsApplication::qgisUserDbFilePath(), "srs_id", id );
return loadFromDb( id < 100000 ? QgsApplication::srsDbFilePath() :
QgsApplication::qgisUserDbFilePath(), "srs_id", id );
}

bool QgsCoordinateReferenceSystem::loadFromDb( QString db, QString field, long id )
Expand Down
20 changes: 10 additions & 10 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -242,54 +242,54 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* @return long theSrsId The internal sqlite3 srs.db primary key for this srs
*/
long srsid() const;

/*! Get the postgis srid for this srs
* @return long theSRID the Postgis spatial_ref_sys identifier for this srs (defaults to 0)
*/
long postgisSrid() const;

/*! Get the EpsgCrsId identifier for this srs
* @return long theEpsg the ESPG identifier for this srs (defaults to 0)
*/
long epsg() const;

/*! Get the Description
* @return QString the Description A textual description of the srs.
* @note A zero length string will be returned if the description is uninitialised
*/
QString description() const;

/*! Get the Projection Acronym
* @return QString theProjectionAcronym The official proj4 acronym for the projection family
* @note A zero length string will be returned if the projectionAcronym is uninitialised
*/
QString projectionAcronym() const;

/*! Get the Ellipsoid Acronym
* @return QString theEllipsoidAcronym The official proj4 acronym for the ellipoid
* @note A zero length string will be returned if the ellipsoidAcronym is uninitialised
*/
QString ellipsoidAcronym() const;

/*! A helper to get an wkt representation of this srs
* @return string containing Wkt of the srs
*/
QString toWkt() const;

/** Get the Proj Proj4 string representation of this srs.
/** Get the Proj Proj4 string representation of this srs.
* If proj and ellps keys are found in the parameters,
* they will be stripped out and the Projection and ellipsoid acronyms will be
* overridden with these.
* @return QString theProj4String Proj4 format specifies that define this srs.
* @note A zero length string will be returned if the toProj4 is uninitialised
*/
QString toProj4() const;

/*! Get this Geographic? flag
* @return bool theGeoFlag Whether this is a geographic or projected coordinate system
*/
bool geographicFlag() const;

/*! Get the units that the projection is in
* @return QGis::UnitType that gives the units for the coordinate system
*/
Expand All @@ -305,7 +305,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
*/
QString validationHint();
// Mutators -----------------------------------
// We dont want to expose these to the public api since they wont create
// We dont want to expose these to the public api since they wont create
// a fully valid crs. Programmers should use the createFrom* methods rather
private:
/** A static helper function to find out the proj4 string for a srsid
Expand Down
24 changes: 12 additions & 12 deletions src/core/qgsgeometry.cpp
Expand Up @@ -4883,24 +4883,24 @@ int QgsGeometry::splitPolygonGeometry( GEOSGeometry* splitLine, QList<QgsGeometr
}

bool splitDone = true;
int nGeometriesThis = GEOSGetNumGeometries(mGeos); //original number of geometries
if(testedGeometries.size() == nGeometriesThis)
{
splitDone = false;
}
int nGeometriesThis = GEOSGetNumGeometries( mGeos ); //original number of geometries
if ( testedGeometries.size() == nGeometriesThis )
{
splitDone = false;
}

mergeGeometriesMultiTypeSplit( testedGeometries );

//no split done, preserve original geometry
if(!splitDone)
if ( !splitDone )
{
for ( int i = 0; i < testedGeometries.size(); ++i )
{
for(int i = 0; i < testedGeometries.size(); ++i)
{
GEOSGeom_destroy(testedGeometries[i]);
}
return 1;
GEOSGeom_destroy( testedGeometries[i] );
}
else if(testedGeometries.size() > 0) //split successfull
return 1;
}
else if ( testedGeometries.size() > 0 ) //split successfull
{
GEOSGeom_destroy( mGeos );
mGeos = testedGeometries[0];
Expand Down
8 changes: 4 additions & 4 deletions src/core/qgsgeometry.h
Expand Up @@ -245,10 +245,10 @@ class CORE_EXPORT QgsGeometry
@param topological true if topological editing is enabled
@topologyTestPoints OUT: points that need to be tested for topological completeness in the dataset
@return 0 in case of success, 1 if geometry has not been split, error else*/
int splitGeometry( const QList<QgsPoint>& splitLine,
QList<QgsGeometry*>&newGeometries,
bool topological,
QList<QgsPoint>& topologyTestPoints );
int splitGeometry( const QList<QgsPoint>& splitLine,
QList<QgsGeometry*>&newGeometries,
bool topological,
QList<QgsPoint>& topologyTestPoints );

/**Changes this geometry such that it does not intersect the other geometry
@param other geometry that should not be intersect
Expand Down
30 changes: 15 additions & 15 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -1758,12 +1758,12 @@ int QgsVectorLayer::splitFeatures( const QList<QgsPoint>& splitLine, bool topolo
}
}

if(numberOfSplitedFeatures == 0 && selectedIds.size() > 0)
{
//There is a selection but no feature has been split.
//Maybe user forgot that only the selected features are split
returnCode = 4;
}
if ( numberOfSplitedFeatures == 0 && selectedIds.size() > 0 )
{
//There is a selection but no feature has been split.
//Maybe user forgot that only the selected features are split
returnCode = 4;
}


//now add the new features to this vectorlayer
Expand Down Expand Up @@ -1918,15 +1918,15 @@ int QgsVectorLayer::addTopologicalPoints( const QgsPoint& p )

//work with a tolerance because coordinate projection may introduce some rounding
double threshold = 0.0000001;
if(mCRS && mCRS->mapUnits() == QGis::Meters)
{
threshold = 0.001;
}
else if(mCRS && mCRS->mapUnits() == QGis::Feet)
{
threshold = 0.0001;
}
if ( mCRS && mCRS->mapUnits() == QGis::Meters )
{
threshold = 0.001;
}
else if ( mCRS && mCRS->mapUnits() == QGis::Feet )
{
threshold = 0.0001;
}


if ( snapWithContext( p, threshold, snapResults, QgsSnapper::SNAP_TO_SEGMENT ) != 0 )
{
Expand Down
12 changes: 6 additions & 6 deletions src/core/renderer/qgsgraduatedsymbolrenderer.cpp
Expand Up @@ -77,7 +77,7 @@ QgsGraduatedSymbolRenderer::~QgsGraduatedSymbolRenderer()
QgsGraduatedSymbolRenderer::Mode QgsGraduatedSymbolRenderer::mode() const
{
//mode is only really used to be able to reinstate
//the graduated dialog properties properly, so we
//the graduated dialog properties properly, so we
//dont do anything else besides accessors and mutators in
//this class
return mMode;
Expand All @@ -86,7 +86,7 @@ QgsGraduatedSymbolRenderer::Mode QgsGraduatedSymbolRenderer::mode() const
void QgsGraduatedSymbolRenderer::setMode( QgsGraduatedSymbolRenderer::Mode theMode )
{
//mode is only really used to be able to reinstate
//the graduated dialog properties properly, so we
//the graduated dialog properties properly, so we
//dont do anything else besides accessors and mutators in
//this class
mMode = theMode;
Expand Down Expand Up @@ -183,7 +183,7 @@ void QgsGraduatedSymbolRenderer::renderFeature( QPainter * p, QgsFeature & f, QI
brush.setColor( mSelectionColor );
p->setBrush( brush );
}
else //dont draw outlines in selection colour for polys otherwise they appear merged
else //dont draw outlines in selection colour for polys otherwise they appear merged
{
pen.setColor( mSelectionColor );
}
Expand Down Expand Up @@ -310,12 +310,12 @@ bool QgsGraduatedSymbolRenderer::writeXML( QDomNode & layer_node, QDomDocument &
// Mode field first ...
//

QString modeValue="";
QString modeValue = "";
if ( mMode == QgsGraduatedSymbolRenderer::Empty )
{
modeValue == "Empty";
modeValue == "Empty";
}
else if ( QgsGraduatedSymbolRenderer::Quantile )
else if ( QgsGraduatedSymbolRenderer::Quantile )
{
modeValue = "Quantile";
}
Expand Down

0 comments on commit 94b31cb

Please sign in to comment.