Skip to content
Permalink
Browse files

indentation update

  • Loading branch information
jef-n committed Sep 29, 2011
1 parent 4342e9b commit 5e9d95b88a5be827785f679eeadd16a2b6372f26
Showing with 247 additions and 248 deletions.
  1. +1 −1 scripts/astyle-all.sh
  2. +1 −1 src/app/qgisapp.cpp
  3. +1 −1 src/app/qgisapp.h
  4. +6 −6 src/app/qgsconfigureshortcutsdialog.cpp
  5. +2 −2 src/app/qgsconfigureshortcutsdialog.h
  6. +2 −2 src/app/qgsdecorationcopyright.cpp
  7. +2 −2 src/app/qgsdecorationcopyright.h
  8. +3 −3 src/app/qgsmaptoolidentify.cpp
  9. +4 −4 src/app/qgsoptions.cpp
  10. +1 −1 src/app/qgsoptions.h
  11. +6 −6 src/core/qgsapplication.cpp
  12. +6 −6 src/core/qgsapplication.h
  13. 0 src/core/qgsproviderregistry.cpp
  14. +1 −1 src/core/qgsrasterdataprovider.h
  15. +23 −23 src/core/qgsvectorlayerimport.cpp
  16. +1 −1 src/core/raster/qgspseudocolorshader.cpp
  17. +7 −7 src/core/symbology-ng/qgsellipsesymbollayerv2.h
  18. +1 −1 src/core/symbology-ng/qgsrulebasedrendererv2.cpp
  19. +2 −2 src/core/symbology-ng/qgsrulebasedrendererv2.h
  20. +1 −1 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
  21. +3 −3 src/core/symbology-ng/qgssymbollayerv2registry.cpp
  22. +24 −24 src/core/symbology-ng/qgssymbollayerv2utils.cpp
  23. +3 −3 src/core/symbology-ng/qgssymbolv2.cpp
  24. +1 −1 src/core/symbology-ng/qgssymbolv2.h
  25. +0 −1 src/gui/qgsquerybuilder.h
  26. +35 −35 src/gui/symbology-ng/qgsellipsesymbollayerv2widget.cpp
  27. +1 −1 src/gui/symbology-ng/qgsellipsesymbollayerv2widget.h
  28. +1 −1 src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
  29. +5 −5 src/plugins/grass/qgsgrassbrowser.cpp
  30. +1 −1 src/providers/gdal/qgsgdalprovider.cpp
  31. +14 −14 src/providers/ogr/qgsogrprovider.cpp
  32. +9 −9 src/providers/ogr/qgsogrprovider.h
  33. +2 −2 src/providers/postgres/qgspgsourceselect.cpp
  34. +1 −1 src/providers/postgres/qgspgsourceselect.h
  35. +30 −30 src/providers/postgres/qgspostgresprovider.cpp
  36. +11 −11 src/providers/postgres/qgspostgresprovider.h
  37. +25 −25 src/providers/spatialite/qgsspatialiteprovider.cpp
  38. +9 −9 src/providers/spatialite/qgsspatialiteprovider.h
  39. +1 −1 tests/src/core/testqgsapplication.cpp
@@ -8,7 +8,7 @@ export elcr="$(tput el)$(tput cr)"

find src -type f -print | while read f; do
case "$f" in
src/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
src/app/gps/qwtpolar-*|src/core/spatialite/*|src/core/gps/qextserialport/*|src/plugins/grass/qtermwidget/*|src/astyle/*|python/pyspatialite/*|src/providers/sqlanywhere/sqlanyconnection/*)
echo $f skipped
continue
;;
@@ -2287,7 +2287,7 @@ void QgisApp::addDatabaseLayers( QStringList const & layerPathList, QString cons

mMapCanvas->freeze( true );

QApplication::setOverrideCursor(Qt::WaitCursor);
QApplication::setOverrideCursor( Qt::WaitCursor );

foreach( QString layerPath, layerPathList )
{
@@ -466,7 +466,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
//! Add a databaselayer to the map
void addDatabaseLayer();
//#endif
//! Add a list of database layers to the map
//! Add a list of database layers to the map
void addDatabaseLayers( QStringList const & layerPathList, QString const & providerKey );
//#ifdef HAVE_SPATIALITE
//! Add a SpatiaLite layer to the map
@@ -49,26 +49,26 @@ QgsConfigureShortcutsDialog::QgsConfigureShortcutsDialog( QWidget* parent )

QgsConfigureShortcutsDialog::~QgsConfigureShortcutsDialog()
{
saveState();
saveState();
}

/*!
* Function to save dialog window state
*/
void QgsConfigureShortcutsDialog::saveState()
{
QSettings settings;
settings.setValue( "/Windows/ShortcutsDialog/geometry", saveGeometry() );
QSettings settings;
settings.setValue( "/Windows/ShortcutsDialog/geometry", saveGeometry() );
}

/*!
* Function to restore dialog window state
*/
void QgsConfigureShortcutsDialog::restoreState()
{
QSettings settings;
restoreGeometry( settings.value( "/Windows/ShortcutsDialog/geometry" ).toByteArray() );
}
QSettings settings;
restoreGeometry( settings.value( "/Windows/ShortcutsDialog/geometry" ).toByteArray() );
}

void QgsConfigureShortcutsDialog::populateActions()
{
@@ -27,7 +27,7 @@ class QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsConfigureShor
public:
QgsConfigureShortcutsDialog( QWidget* parent = NULL );
~QgsConfigureShortcutsDialog();

void populateActions();

protected:
@@ -58,7 +58,7 @@ class QgsConfigureShortcutsDialog : public QDialog, private Ui::QgsConfigureShor
* Function to save dialog window state
*/
void saveState();

/*!
* Function to restore dialog window state
*/
@@ -42,7 +42,7 @@ email : tim@linfiniti.com


QgsDecorationCopyright::QgsDecorationCopyright( QObject* parent )
: QObject(parent)
: QObject( parent )
{
mPlacementLabels << tr( "Bottom Left" ) << tr( "Top Left" )
<< tr( "Top Right" ) << tr( "Bottom Right" );
@@ -77,7 +77,7 @@ void QgsDecorationCopyright::run()
{
QgsDecorationCopyrightDialog dlg( *this, QgisApp::instance() );

if (dlg.exec())
if ( dlg.exec() )
{
saveToProject();
QgisApp::instance()->mapCanvas()->refresh();
@@ -29,8 +29,8 @@ class QgsDecorationCopyrightDialog;

class QgsDecorationCopyright : public QObject
{
Q_OBJECT
public:
Q_OBJECT
public:

//! Constructor
QgsDecorationCopyright( QObject* parent = NULL );
@@ -245,9 +245,9 @@ bool QgsMapToolIdentify::identifyVectorLayer( QgsVectorLayer *layer, int x, int
QgsDistanceArea calc;
if ( !featureList.count() == 0 )
{
calc.setProjectionsEnabled( mCanvas->hasCrsTransformEnabled() ); // project?
calc.setEllipsoid( ellipsoid );
calc.setSourceCrs( layer->crs().srsid() );
calc.setProjectionsEnabled( mCanvas->hasCrsTransformEnabled() ); // project?
calc.setEllipsoid( ellipsoid );
calc.setSourceCrs( layer->crs().srsid() );
}
QgsFeatureList::iterator f_it = featureList.begin();

@@ -1040,7 +1040,7 @@ void QgsOptions::loadGdalDriverList()
myGdalDriverDescription = GDALGetDescription( myGdalDriver );
myDrivers << myGdalDriverDescription;
}
// add the skipped drivers to the list too in case their drivers are
// add the skipped drivers to the list too in case their drivers are
// already unloaded...may result in false positive if underlying
// sys config has changed and that driver no longer exists...
myDrivers.append( mySkippedDrivers );
@@ -1049,7 +1049,7 @@ void QgsOptions::loadGdalDriverList()

QStringListIterator myIterator( myDrivers );

while (myIterator.hasNext())
while ( myIterator.hasNext() )
{
QString myName = myIterator.next();
QListWidgetItem * mypItem = new QListWidgetItem( myName );
@@ -1067,7 +1067,7 @@ void QgsOptions::loadGdalDriverList()

void QgsOptions::saveGdalDriverList()
{
for ( int i=0; i < lstGdalDrivers->count(); i++ )
for ( int i = 0; i < lstGdalDrivers->count(); i++ )
{
QListWidgetItem * mypItem = lstGdalDrivers->item( i );
if ( mypItem->checkState() == Qt::Unchecked )
@@ -1080,5 +1080,5 @@ void QgsOptions::saveGdalDriverList()
}
}
QSettings mySettings;
mySettings.setValue( "gdal/skipList", QgsApplication::skippedGdalDrivers().join(" ") );
mySettings.setValue( "gdal/skipList", QgsApplication::skippedGdalDrivers().join( " " ) );
}
@@ -129,7 +129,7 @@ class QgsOptions : public QDialog, private Ui::QgsOptionsBase
* @note added in 2.0
*/
void saveGdalDriverList();

protected:
//! Populates combo box with ellipsoids
void getEllipsoidList();
@@ -129,12 +129,12 @@ void QgsApplication::init( QString customConfigPath )
{
myDir.mkpath( myPamPath ); //fail silently
}


#if defined(Q_WS_WIN32) || defined(WIN32)
CPLSetConfigOption("GDAL_PAM_PROXY_DIR", myPamPath.toUtf8());
CPLSetConfigOption( "GDAL_PAM_PROXY_DIR", myPamPath.toUtf8() );
#else
//under other OS's we use an environment var so the user can
//under other OS's we use an environment var so the user can
//override the path if he likes
int myChangeFlag = 0; //whether we want to force the env var to change
setenv( "GDAL_PAM_PROXY_DIR", myPamPath.toUtf8(), myChangeFlag );
@@ -741,9 +741,9 @@ void QgsApplication::restoreGdalDriver( QString theDriver )
void QgsApplication::applyGdalSkippedDrivers()
{
mGdalSkipList.removeDuplicates();
QString myDriverList = mGdalSkipList.join(" ");
QString myDriverList = mGdalSkipList.join( " " );
QgsDebugMsg( "Gdal Skipped driver list set to:" );
QgsDebugMsg( myDriverList );
CPLSetConfigOption("GDAL_SKIP", myDriverList.toUtf8());
CPLSetConfigOption( "GDAL_SKIP", myDriverList.toUtf8() );
GetGDALDriverManager()->AutoSkipDrivers();
}
@@ -224,25 +224,25 @@ class CORE_EXPORT QgsApplication: public QApplication
@note added in 2.0 */
static QString buildOutputPath() { return mBuildOutputPath; }

/** Sets the GDAL_SKIP environment variable to include the specified driver
/** Sets the GDAL_SKIP environment variable to include the specified driver
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The
* driver name should be the short format of the Gdal driver name e.g. GTIFF.
* @note added in 2.0
*/
static void skipGdalDriver( QString theDriver );

/** Sets the GDAL_SKIP environment variable to exclude the specified driver
/** Sets the GDAL_SKIP environment variable to exclude the specified driver
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The
* driver name should be the short format of the Gdal driver name e.g. GTIFF.
* @note added in 2.0
*/
static void restoreGdalDriver( QString theDriver );

/** Returns the list of gdal drivers that should be skipped (based on
* GDAL_SKIP environment variable)
* GDAL_SKIP environment variable)
* @note added in 2.0
*/
static QStringList skippedGdalDrivers( ){ return mGdalSkipList; };
static QStringList skippedGdalDrivers( ) { return mGdalSkipList; };

/** Apply the skipped drivers list to gdal
* @see skipGdalDriver
@@ -274,8 +274,8 @@ class CORE_EXPORT QgsApplication: public QApplication
static QString mBuildSourcePath;
/** path to the output directory of the build. valid only when running from build directory */
static QString mBuildOutputPath;
/** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them.
* @see skipGdalDriver, restoreGdalDriver
/** List of gdal drivers to be skipped. Uses GDAL_SKIP to exclude them.
* @see skipGdalDriver, restoreGdalDriver
* @note added in 2.0 */
static QStringList mGdalSkipList;
};
0 src/core/qgsproviderregistry.cpp 100755 → 100644
Empty file.
@@ -327,7 +327,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider

/** read block of data using give extent and size */
virtual void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, QgsCoordinateReferenceSystem theSrcCRS, QgsCoordinateReferenceSystem theDestCRS, void *data );

/* Read a value from a data block at a given index. */
virtual double readValue( void *data, int type, int index );

@@ -41,25 +41,25 @@
#define FEATURE_BUFFER_SIZE 200

typedef QgsVectorLayerImport::ImportError createEmptyLayer_t(
const QString &uri,
const QgsFieldMap &fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem *destCRS,
bool overwrite,
QMap<int, int> *oldToNewAttrIdx,
QString *errorMessage,
const QMap<QString, QVariant> *options
);
const QString &uri,
const QgsFieldMap &fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem *destCRS,
bool overwrite,
QMap<int, int> *oldToNewAttrIdx,
QString *errorMessage,
const QMap<QString, QVariant> *options
);


QgsVectorLayerImport::QgsVectorLayerImport(
const QString &uri,
const QString &providerKey,
const QgsFieldMap& fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem* crs,
bool overwrite,
const QMap<QString, QVariant> *options )
const QString &uri,
const QString &providerKey,
const QgsFieldMap& fields,
QGis::WkbType geometryType,
const QgsCoordinateReferenceSystem* crs,
bool overwrite,
const QMap<QString, QVariant> *options )
{
mProvider = NULL;
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
@@ -181,13 +181,13 @@ bool QgsVectorLayerImport::flushBuffer()

QgsVectorLayerImport::ImportError
QgsVectorLayerImport::importLayer( QgsVectorLayer* layer,
const QString& uri,
const QString& providerKey,
const QgsCoordinateReferenceSystem *destCRS,
bool onlySelected,
QString *errorMessage,
bool skipAttributeCreation,
QMap<QString, QVariant> *options )
const QString& uri,
const QString& providerKey,
const QgsCoordinateReferenceSystem *destCRS,
bool onlySelected,
QString *errorMessage,
bool skipAttributeCreation,
QMap<QString, QVariant> *options )
{
const QgsCoordinateReferenceSystem* outputCRS;
QgsCoordinateTransform* ct = 0;
@@ -44,7 +44,7 @@ bool QgsPseudoColorShader::shade( double theValue, int* theReturnRedValue, int*
}

//check if we are in the first class break
if ( ( myPixelValue >= mClassBreakMin1 ) && ( myPixelValue < mClassBreakMax1 ) )
if (( myPixelValue >= mClassBreakMin1 ) && ( myPixelValue < mClassBreakMax1 ) )
{
*theReturnRedValue = 0;
*theReturnGreenValue = static_cast < int >((( 255 / mMinimumMaximumRange ) * ( myPixelValue - mClassBreakMin1 ) ) * 3 );
@@ -20,19 +20,19 @@ class CORE_EXPORT QgsEllipseSymbolLayerV2: public QgsMarkerSymbolLayerV2
QgsSymbolLayerV2* clone() const;
QgsStringMap properties() const;

void setSymbolName( const QString& name ){ mSymbolName = name; }
QString symbolName() const{ return mSymbolName; }
void setSymbolName( const QString& name ) { mSymbolName = name; }
QString symbolName() const { return mSymbolName; }

void setSymbolNameField( int index, const QString& field );
const QPair<int, QString>& symbolNameField() const { return mSymbolNameField; }

void setSymbolWidth( double w ){ mSymbolWidth = w; }
void setSymbolWidth( double w ) { mSymbolWidth = w; }
double symbolWidth() const { return mSymbolWidth; }

void setWidthField( int index, const QString& field );
const QPair<int, QString>& widthField() const { return mWidthField; }

void setSymbolHeight( double h ){ mSymbolHeight = h; }
void setSymbolHeight( double h ) { mSymbolHeight = h; }
double symbolHeight() const { return mSymbolHeight; }

void setHeightField( int index, const QString& field );
@@ -41,19 +41,19 @@ class CORE_EXPORT QgsEllipseSymbolLayerV2: public QgsMarkerSymbolLayerV2
void setRotationField( int index, const QString& field );
const QPair<int, QString>& rotationField() const { return mRotationField; }

void setOutlineWidth( double w ){ mOutlineWidth = w; }
void setOutlineWidth( double w ) { mOutlineWidth = w; }
double outlineWidth() const { return mOutlineWidth; }

void setOutlineWidthField( int index, const QString& field );
const QPair<int, QString>& outlineWidthField() const { return mOutlineWidthField; }

void setFillColor( const QColor& c ){ mFillColor = c;}
void setFillColor( const QColor& c ) { mFillColor = c;}
QColor fillColor() const { return mFillColor; }

void setFillColorField( int index, const QString& field );
const QPair<int, QString>& fillColorField() const { return mFillColorField; }

void setOutlineColor( const QColor& c ){ mOutlineColor = c; }
void setOutlineColor( const QColor& c ) { mOutlineColor = c; }
QColor outlineColor() const { return mOutlineColor; }

void setOutlineColorField( int index, const QString& field );
@@ -129,7 +129,7 @@ QgsRuleBasedRendererV2::QgsRuleBasedRendererV2( QgsSymbolV2* defaultSymbol )

QgsSymbolV2* QgsRuleBasedRendererV2::symbolForFeature( QgsFeature& feature )
{
if( ! usingFirstRule() )
if ( ! usingFirstRule() )
return mCurrentSymbol;

for ( QList<Rule*>::iterator it = mCurrentRules.begin(); it != mCurrentRules.end(); ++it )
@@ -46,7 +46,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
public:
//! Constructor takes ownership of the symbol
Rule( QgsSymbolV2* symbol, int scaleMinDenom = 0, int scaleMaxDenom = 0, QString filterExp = QString(),
QString label = QString(), QString description = QString() );
QString label = QString(), QString description = QString() );
Rule( const Rule& other );
~Rule();
QString dump() const;
@@ -133,7 +133,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
//! remove the rule at the specified index
void removeRuleAt( int index );
//! swap the two rules specified by the indices
void swapRules( int index1, int index2);
void swapRules( int index1, int index2 );

//////

@@ -123,7 +123,7 @@ void QgsSingleSymbolRendererV2::stopRender( QgsRenderContext& context )
QList<QString> QgsSingleSymbolRendererV2::usedAttributes()
{
QSet<QString> attributes;
if( mSymbol )
if ( mSymbol )
{
attributes.unite( mSymbol->usedAttributes() );
}

0 comments on commit 5e9d95b

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