Skip to content
Permalink
Browse files

automatic indentation update (r10488-r10594)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10595 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Apr 19, 2009
1 parent cbf5ee4 commit ba0a1ebbbd09cbb04e547790d50cc36fa6d886df
@@ -164,12 +164,12 @@ void QgsAbout::init()
if ( translatorFile.open( QIODevice::ReadOnly ) )
{
QString translatorHTML = ""
+ tr( "<p>The following have contributed to QGIS"
" by translating the user interface or documentation</p>" )
+ "<hr>"
"<table width='100%'>"
"<tr><th>" + tr( "Language" ) + "</th>"
"<th>" + tr( "Names" ) + "</th></tr>";
+ tr( "<p>The following have contributed to QGIS"
" by translating the user interface or documentation</p>" )
+ "<hr>"
"<table width='100%'>"
"<tr><th>" + tr( "Language" ) + "</th>"
"<th>" + tr( "Names" ) + "</th></tr>";
QString website;
QTextStream translatorStream( &translatorFile );
// Always use UTF-8
@@ -184,8 +184,8 @@ void QgsAttributeActionDialog::insert( int pos )

if ( actionName->text().isEmpty() || actionAction->text().isEmpty() )
{
QMessageBox::warning( this, tr( "Missing Information" ),
tr( "To create an attribute action, you must provide both a name and the action to perform." ) );
QMessageBox::warning( this, tr( "Missing Information" ),
tr( "To create an attribute action, you must provide both a name and the action to perform." ) );

}
else
@@ -216,7 +216,7 @@ void QgsAttributeActionDialog::insert( int pos )
attributeActionTable->item( pos, 0 )->setText( name );
attributeActionTable->item( pos, 1 )->setText( actionAction->text() );
attributeActionTable->item( pos, 2 )->setCheckState(
captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
captureCB->isChecked() ? Qt::Checked : Qt::Unchecked );
}
}
}
@@ -99,20 +99,20 @@ void QgsMapToolAddVertex::canvasReleaseEvent( QMouseEvent * e )
//ignore the snapping results that are on features / segments already considered in mRecentSnappingResults
QList<QgsSnappingResult> filteredSnapResults = snapResults;
QList<QgsSnappingResult>::iterator recentIt = mRecentSnappingResults.begin();
for(; recentIt != mRecentSnappingResults.end(); ++recentIt)
for ( ; recentIt != mRecentSnappingResults.end(); ++recentIt )
{
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
for(; filterIt != filteredSnapResults.end(); ++filterIt)
QList<QgsSnappingResult>::iterator filterIt = filteredSnapResults.begin();
for ( ; filterIt != filteredSnapResults.end(); ++filterIt )
{
if ( filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
{
if(filterIt->snappedAtGeometry == recentIt->snappedAtGeometry \
&& filterIt->snappedVertexNr == recentIt->snappedVertexNr \
&& filterIt->beforeVertexNr == recentIt->beforeVertexNr )
{
filteredSnapResults.erase(filterIt);
continue;
}

filteredSnapResults.erase( filterIt );
continue;
}

}
}
insertSegmentVerticesForSnap( filteredSnapResults, vlayer );
}
@@ -49,7 +49,7 @@ class CORE_EXPORT QgsDataSourceURI
QString quotedTablename() const;

//! Set all connection related members at once
//! \note This optional sslmode parameter has been added in version 1.1
//! \note This optional sslmode parameter has been added in version 1.1
void setConnection( const QString& aHost,
const QString& aPort,
const QString& aDatabase,
@@ -471,7 +471,7 @@ void QgsMapRenderer::render( QPainter* painter )
overlayManager->removeLayers();
}

delete overlayManager;
delete overlayManager;
// make sure progress bar arrives at 100%!
emit drawingProgress( 1, 1 );

@@ -60,19 +60,19 @@ double QgsTolerance::computeMapUnitPerPixel( QgsMapLayer* layer, QgsMapRenderer*
// the layer is projected. Find out how many pixels are in one map unit - either horizontal and vertical direction
// this check might not work correctly in some cases
// (on a large area the pixels projected around "0,0" can have different properties from the actual point)
QgsPoint p1 = toLayerCoordinates(layer, renderer, QPoint(0,1));
QgsPoint p2 = toLayerCoordinates(layer, renderer, QPoint(0,2));
QgsPoint p3 = toLayerCoordinates(layer, renderer, QPoint(1,0));
QgsPoint p4 = toLayerCoordinates(layer, renderer, QPoint(2,0));
double x = p1.sqrDist(p2);
double y = p3.sqrDist(p4);
if (x > y)
QgsPoint p1 = toLayerCoordinates( layer, renderer, QPoint( 0, 1 ) );
QgsPoint p2 = toLayerCoordinates( layer, renderer, QPoint( 0, 2 ) );
QgsPoint p3 = toLayerCoordinates( layer, renderer, QPoint( 1, 0 ) );
QgsPoint p4 = toLayerCoordinates( layer, renderer, QPoint( 2, 0 ) );
double x = p1.sqrDist( p2 );
double y = p3.sqrDist( p4 );
if ( x > y )
{
return sqrt(x);
return sqrt( x );
}
else
{
return sqrt(y);
return sqrt( y );
}
}

@@ -2117,12 +2117,12 @@ bool QgsVectorLayer::readXml( QDomNode & layer_node )
}

QDomElement pkeyElem = pkeyNode.toElement();
if(!pkeyElem.isNull())
if ( !pkeyElem.isNull() )
{
QString encodingString = pkeyElem.attribute("encoding");
if(!encodingString.isEmpty())
QString encodingString = pkeyElem.attribute( "encoding" );
if ( !encodingString.isEmpty() )
{
mDataProvider->setEncoding(encodingString);
mDataProvider->setEncoding( encodingString );
}
}

@@ -2255,14 +2255,14 @@ bool QgsVectorLayer::writeXml( QDomNode & layer_node,
mapLayerNode.setAttribute( "geometry", QGis::qgisVectorGeometryType[geometryType()] );

// add provider node
if(mDataProvider)
{
QDomElement provider = document.createElement( "provider" );
provider.setAttribute("encoding", mDataProvider->encoding());
QDomText providerText = document.createTextNode( providerType() );
provider.appendChild( providerText );
layer_node.appendChild( provider );
}
if ( mDataProvider )
{
QDomElement provider = document.createElement( "provider" );
provider.setAttribute( "encoding", mDataProvider->encoding() );
QDomText providerText = document.createTextNode( providerType() );
provider.appendChild( providerText );
layer_node.appendChild( provider );
}

// renderer specific settings

@@ -85,7 +85,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
setScene( mScene );
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
mLastExtentIndex=-1;
mLastExtentIndex = -1;
mCurrentLayer = NULL;
mMapOverview = NULL;
mMapTool = NULL;
@@ -436,7 +436,7 @@ void QgsMapCanvas::saveAsImage( QString theFileName, QPixmap * theQPixmap, QStri
// allow dotted names
QString myWorldFileName = myInfo.absolutePath() + QDir::separator() + myInfo.completeBaseName() + "." + theFormat + "w";
QFile myWorldFile( myWorldFileName );
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
if ( !myWorldFile.open( QIODevice::WriteOnly ) ) //don't use QIODevice::Text
{
return;
}
@@ -495,17 +495,17 @@ void QgsMapCanvas::setExtent( QgsRectangle const & r )
updateScale();
if ( mMapOverview )
mMapOverview->drawExtentRect();
if (mLastExtent.size()>20) mLastExtent.removeAt(0);
if ( mLastExtent.size() > 20 ) mLastExtent.removeAt( 0 );

//clear all extent items after current index
for (int i=mLastExtent.size()-1; i>mLastExtentIndex; i--)
for ( int i = mLastExtent.size() - 1; i > mLastExtentIndex; i-- )
{
mLastExtent.removeAt(i);
mLastExtent.removeAt( i );
}


mLastExtent.append(extent()) ;
mLastExtentIndex=mLastExtent.size()-1;
mLastExtent.append( extent() ) ;
mLastExtentIndex = mLastExtent.size() - 1;
// notify canvas items of change
updateCanvasItemPositions();

@@ -552,40 +552,40 @@ void QgsMapCanvas::zoomToFullExtent()

void QgsMapCanvas::zoomToPreviousExtent()
{
if ( mDrawing )
{
return;
}

if (mLastExtentIndex>1)
{
mLastExtentIndex--;
mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
emit extentsChanged();
updateScale();
if ( mMapOverview )
mMapOverview->drawExtentRect();
}
if ( mDrawing )
{
return;
}

if ( mLastExtentIndex > 1 )
{
mLastExtentIndex--;
mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
emit extentsChanged();
updateScale();
if ( mMapOverview )
mMapOverview->drawExtentRect();
}

refresh();
} // zoomToPreviousExtent

void QgsMapCanvas::zoomToNextExtent()
{
if ( mDrawing )
{
return;
}
if (mLastExtentIndex<mLastExtent.size()-1)
{
mLastExtentIndex++;
mMapRenderer->setExtent(mLastExtent[mLastExtentIndex]);
emit extentsChanged();
updateScale();
if ( mMapOverview )
mMapOverview->drawExtentRect();
}
refresh();
if ( mDrawing )
{
return;
}
if ( mLastExtentIndex < mLastExtent.size() - 1 )
{
mLastExtentIndex++;
mMapRenderer->setExtent( mLastExtent[mLastExtentIndex] );
emit extentsChanged();
updateScale();
if ( mMapOverview )
mMapOverview->drawExtentRect();
}
refresh();
}// zoomToNextExtent


@@ -315,7 +315,7 @@ QgsPostgresProvider::Conn *QgsPostgresProvider::Conn::connectDb( const QString &
if ( conn->postgisVersion().isNull() )
{
showMessageBox( tr( "No PostGIS Support!" ),
tr( "Your database has no working PostGIS support.\n") );
tr( "Your database has no working PostGIS support.\n" ) );
conn->PQfinish();
delete conn;
return NULL;
@@ -1743,7 +1743,7 @@ bool QgsPostgresProvider::Conn::hasGEOS()
QString QgsPostgresProvider::Conn::postgisVersion()
{
Result result = PQexec( "select postgis_version()" );
if( PQntuples( result ) != 1 )
if ( PQntuples( result ) != 1 )
{
QgsDebugMsg( "Retrieval of postgis version failed" );
return QString::null;
@@ -1757,7 +1757,7 @@ QString QgsPostgresProvider::Conn::postgisVersion()

// Get major and minor version
QStringList postgisVersionParts = postgisParts[0].split( ".", QString::SkipEmptyParts );
if( postgisVersionParts.size() < 2 )
if ( postgisVersionParts.size() < 2 )
{
QgsDebugMsg( "Could not parse postgis version" );
return QString::null;

0 comments on commit ba0a1eb

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