[QGIS Commit] r15227 - in trunk/qgis: src/app src/app/composer
src/app/gps src/app/gps/qwtpolar src/app/legend src/core
src/core/spatialindex/include src/gui src/gui/symbology-ng
src/plugins/grass src/plugins/offline_editing tests/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Feb 20 17:35:13 EST 2011
Author: jef
Date: 2011-02-20 14:35:13 -0800 (Sun, 20 Feb 2011)
New Revision: 15227
Modified:
trunk/qgis/src/app/composer/qgscomposer.cpp
trunk/qgis/src/app/composer/qgscomposerlegendlayersdialog.cpp
trunk/qgis/src/app/gps/qgsgpsmarker.cpp
trunk/qgis/src/app/gps/qwtpolar/qwt_polar_itemdict.cpp
trunk/qgis/src/app/legend/qgslegendgroup.cpp
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgsdisplayangle.cpp
trunk/qgis/src/app/qgsdisplayangle.h
trunk/qgis/src/app/qgslabelpropertydialog.h
trunk/qgis/src/app/qgsmaptoolselect.cpp
trunk/qgis/src/core/qgscoordinatereferencesystem.cpp
trunk/qgis/src/core/qgscoordinatereferencesystem.h
trunk/qgis/src/core/qgsmaprenderer.cpp
trunk/qgis/src/core/qgspallabeling.cpp
trunk/qgis/src/core/spatialindex/include/Tools.h
trunk/qgis/src/gui/qgsmapcanvas.cpp
trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
trunk/qgis/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
trunk/qgis/src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
trunk/qgis/src/plugins/grass/qgsgrassregion.h
trunk/qgis/src/plugins/grass/qgsgrassselect.cpp
trunk/qgis/src/plugins/offline_editing/offline_editing_plugin_gui.cpp
trunk/qgis/tests/src/core/regression992.cpp
Log:
automatic indentation update (r14435-r15226)
Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -80,7 +80,7 @@
QSettings settings;
int size = settings.value( "/IconSize", 24 ).toInt();
- setIconSize(QSize(size,size));
+ setIconSize( QSize( size, size ) );
QToolButton* orderingToolButton = new QToolButton( this );
orderingToolButton->setPopupMode( QToolButton::InstantPopup );
@@ -302,15 +302,15 @@
void QgsComposer::setIconSizes( int size )
{
- //Set the icon size of for all the toolbars created in the future.
- setIconSize(QSize(size,size));
+ //Set the icon size of for all the toolbars created in the future.
+ setIconSize( QSize( size, size ) );
- //Change all current icon sizes.
- QList<QToolBar *> toolbars = findChildren<QToolBar *>();
- foreach(QToolBar * toolbar, toolbars)
- {
- toolbar->setIconSize(QSize(size,size));
- }
+ //Change all current icon sizes.
+ QList<QToolBar *> toolbars = findChildren<QToolBar *>();
+ foreach( QToolBar * toolbar, toolbars )
+ {
+ toolbar->setIconSize( QSize( size, size ) );
+ }
}
void QgsComposer::connectSlots()
Modified: trunk/qgis/src/app/composer/qgscomposerlegendlayersdialog.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposerlegendlayersdialog.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/composer/qgscomposerlegendlayersdialog.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -21,11 +21,11 @@
setupUi( this );
QList<QgsMapLayer*>::iterator layerIt = layers.begin();
- for (; layerIt != layers.end(); ++layerIt )
+ for ( ; layerIt != layers.end(); ++layerIt )
{
QListWidgetItem* item = new QListWidgetItem(( *layerIt )->name(), listMapLayers );
mItemLayerMap.insert( item, *layerIt );
- }
+ }
}
QgsComposerLegendLayersDialog::QgsComposerLegendLayersDialog(): QDialog( 0 )
Modified: trunk/qgis/src/app/gps/qgsgpsmarker.cpp
===================================================================
--- trunk/qgis/src/app/gps/qgsgpsmarker.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/gps/qgsgpsmarker.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -24,7 +24,7 @@
QgsGpsMarker::QgsGpsMarker( QgsMapCanvas* mapCanvas )
- : QgsMapCanvasItem( mapCanvas )
+ : QgsMapCanvasItem( mapCanvas )
{
mSize = 16;
mWgs84CRS.createFromEpsg( 4326 );
@@ -38,14 +38,14 @@
void QgsGpsMarker::setCenter( const QgsPoint& point )
{
//transform to map crs
- if( mMapCanvas && mMapCanvas->mapRenderer() )
+ if ( mMapCanvas && mMapCanvas->mapRenderer() )
{
QgsCoordinateTransform t( mWgs84CRS, mMapCanvas->mapRenderer()->destinationSrs() );
try
{
mCenter = t.transform( point );
}
- catch( QgsCsException e ) //silently ignore transformation exceptions
+ catch ( QgsCsException e ) //silently ignore transformation exceptions
{
return;
}
@@ -62,7 +62,7 @@
void QgsGpsMarker::paint( QPainter* p )
{
QSvgRenderer mySVG;
- if( !mySVG.load( QString( ":/images/north_arrows/gpsarrow2.svg" ) ) )
+ if ( !mySVG.load( QString( ":/images/north_arrows/gpsarrow2.svg" ) ) )
{
qDebug( "GPS marker not found!" );
return;
Modified: trunk/qgis/src/app/gps/qwtpolar/qwt_polar_itemdict.cpp
===================================================================
--- trunk/qgis/src/app/gps/qwtpolar/qwt_polar_itemdict.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/gps/qwtpolar/qwt_polar_itemdict.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -28,7 +28,7 @@
// for lists in Qt4. The implementation below
// is slow, but there shouldn't be many plot items.
- // TODO add binary search
+ // TODO add binary search
#if QT_VERSION < 0x040000
QValueListIterator<QwtPolarItem *> it;
Modified: trunk/qgis/src/app/legend/qgslegendgroup.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendgroup.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/legend/qgslegendgroup.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -25,7 +25,7 @@
#include <QIcon>
QgsLegendGroup::QgsLegendGroup( QTreeWidgetItem * theItem, QString theName )
- : QgsLegendItem( theItem, theName )
+ : QgsLegendItem( theItem, theName )
{
mType = LEGEND_GROUP;
setFlags( Qt::ItemIsEditable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
@@ -34,7 +34,7 @@
setIcon( 0, myIcon );
}
QgsLegendGroup::QgsLegendGroup( QTreeWidget* theListView, QString theString )
- : QgsLegendItem( theListView, theString )
+ : QgsLegendItem( theListView, theString )
{
mType = LEGEND_GROUP;
setFlags( Qt::ItemIsEditable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable );
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/qgisapp.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -550,7 +550,7 @@
}
else
{
- QgsDebugMsg( "Tips are disabled");
+ QgsDebugMsg( "Tips are disabled" );
}
//finally show all the application settings as initialised above
@@ -1893,7 +1893,7 @@
mHelpToolBar->addAction( mActionHelpContents );
mHelpToolBar->addAction( QWhatsThis::createAction() );
mToolbarMenu->addAction( mHelpToolBar->toggleViewAction() );
-
+
//
// Raster Toolbar
mRasterToolBar = addToolBar( tr( "Raster" ) );
@@ -2050,18 +2050,18 @@
//Set the icon size of for all the toolbars created in the future.
setIconSize( QSize( size, size ) );
- //Change all current icon sizes.
- QList<QToolBar *> toolbars = findChildren<QToolBar *>();
- foreach( QToolBar * toolbar, toolbars )
- {
- toolbar->setIconSize( QSize( size, size ) );
- }
-
- QSet<QgsComposer*>::iterator composerIt = mPrintComposers.begin();
- for ( ; composerIt != mPrintComposers.end(); ++composerIt )
- {
- ( *composerIt )->setIconSizes(size);
- }
+ //Change all current icon sizes.
+ QList<QToolBar *> toolbars = findChildren<QToolBar *>();
+ foreach( QToolBar * toolbar, toolbars )
+ {
+ toolbar->setIconSize( QSize( size, size ) );
+ }
+
+ QSet<QgsComposer*>::iterator composerIt = mPrintComposers.begin();
+ for ( ; composerIt != mPrintComposers.end(); ++composerIt )
+ {
+ ( *composerIt )->setIconSizes( size );
+ }
}
void QgisApp::setTheme( QString theThemeName )
@@ -5525,11 +5525,11 @@
}
if ( rlayer->drawingStyle() == QgsRasterLayer::SingleBandGray ||
rlayer->drawingStyle() == QgsRasterLayer::MultiBandSingleBandGray
- )
+ )
{
rlayer->setContrastEnhancementAlgorithm( "StretchToMinimumMaximum" );
rlayer->setMinimumMaximumUsingLastExtent();
- rlayer->setCacheImage(NULL);
+ rlayer->setCacheImage( NULL );
//refreshLayerSymbology( rlayer->getLayerID() );
mMapCanvas->refresh();
return;
@@ -5537,10 +5537,10 @@
else
{
QMessageBox::information( this,
- tr( "No Valid Raster Layer Selected" ),
- tr( "To perform a local histogram stretch, you need to have a grayscale "
- "(multiband single layer, or singleband grayscale) raster layer "
- "selected." ) );
+ tr( "No Valid Raster Layer Selected" ),
+ tr( "To perform a local histogram stretch, you need to have a grayscale "
+ "(multiband single layer, or singleband grayscale) raster layer "
+ "selected." ) );
return;
}
}
Modified: trunk/qgis/src/app/qgsdisplayangle.cpp
===================================================================
--- trunk/qgis/src/app/qgsdisplayangle.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/qgsdisplayangle.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -27,10 +27,10 @@
else
mcbProjectionEnabled->setCheckState( Qt::Unchecked );
- connect( mcbProjectionEnabled, SIGNAL( stateChanged(int) ),
- this, SLOT( changeState() ) );
- connect( mcbProjectionEnabled, SIGNAL( stateChanged(int) ),
- this, SIGNAL( changeProjectionEnabledState() ) );
+ connect( mcbProjectionEnabled, SIGNAL( stateChanged( int ) ),
+ this, SLOT( changeState() ) );
+ connect( mcbProjectionEnabled, SIGNAL( stateChanged( int ) ),
+ this, SIGNAL( changeProjectionEnabledState() ) );
}
QgsDisplayAngle::~QgsDisplayAngle()
@@ -65,7 +65,7 @@
{
QSettings settings;
if ( mcbProjectionEnabled->isChecked() )
- settings.setValue( "/qgis/measure/projectionEnabled", 2);
+ settings.setValue( "/qgis/measure/projectionEnabled", 2 );
else
- settings.setValue( "/qgis/measure/projectionEnabled", 0);
+ settings.setValue( "/qgis/measure/projectionEnabled", 0 );
}
Modified: trunk/qgis/src/app/qgsdisplayangle.h
===================================================================
--- trunk/qgis/src/app/qgsdisplayangle.h 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/qgsdisplayangle.h 2011-02-20 22:35:13 UTC (rev 15227)
@@ -34,7 +34,7 @@
signals:
void changeProjectionEnabledState();
-
+
private slots:
void changeState();
Modified: trunk/qgis/src/app/qgslabelpropertydialog.h
===================================================================
--- trunk/qgis/src/app/qgslabelpropertydialog.h 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/qgslabelpropertydialog.h 2011-02-20 22:35:13 UTC (rev 15227)
@@ -28,7 +28,7 @@
/**A dialog to enter data defined label attributes*/
class QgsLabelPropertyDialog: public QDialog, private Ui::QgsLabelPropertyDialogBase
{
- Q_OBJECT
+ Q_OBJECT
public:
QgsLabelPropertyDialog( const QString& layerId, int featureId, QgsMapRenderer* renderer, QWidget * parent = 0, Qt::WindowFlags f = 0 );
~QgsLabelPropertyDialog();
@@ -48,7 +48,7 @@
void on_mBufferColorButton_clicked();
void on_mHaliComboBox_currentIndexChanged( const QString& text );
void on_mValiComboBox_currentIndexChanged( const QString& text );
- void on_mLabelTextLineEdit_textChanged ( const QString& text );
+ void on_mLabelTextLineEdit_textChanged( const QString& text );
private:
/**Sets activation / values to the gui elements depending on the label settings and feature values*/
Modified: trunk/qgis/src/app/qgsmaptoolselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolselect.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/app/qgsmaptoolselect.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -29,7 +29,7 @@
QgsMapToolSelect::QgsMapToolSelect( QgsMapCanvas* canvas )
- : QgsMapTool( canvas )
+ : QgsMapTool( canvas )
{
mCursor = Qt::ArrowCursor;
}
@@ -37,7 +37,7 @@
void QgsMapToolSelect::canvasReleaseEvent( QMouseEvent * e )
{
QgsVectorLayer* vlayer = QgsMapToolSelectUtils::getCurrentVectorLayer( mCanvas );
- if( vlayer == NULL )
+ if ( vlayer == NULL )
{
return;
}
Modified: trunk/qgis/src/core/qgscoordinatereferencesystem.cpp
===================================================================
--- trunk/qgis/src/core/qgscoordinatereferencesystem.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/core/qgscoordinatereferencesystem.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -99,30 +99,30 @@
bool QgsCoordinateReferenceSystem::createFromString( const QString theDefinition )
{
bool result = false;
- QRegExp reCrsId("^(epsg|postgis|internal)\\:(\\d+)$",Qt::CaseInsensitive);
- if( reCrsId.indexIn(theDefinition) == 0)
+ QRegExp reCrsId( "^(epsg|postgis|internal)\\:(\\d+)$", Qt::CaseInsensitive );
+ if ( reCrsId.indexIn( theDefinition ) == 0 )
{
- QString authName = reCrsId.cap(1).toLower();
- CrsType type = InternalCrsId;
- if( authName == "epsg" ) type = EpsgCrsId;
- if( authName == "postgis" ) type = PostgisCrsId;
- long id = reCrsId.cap(2).toLong();
- result = createFromId(id,type);
+ QString authName = reCrsId.cap( 1 ).toLower();
+ CrsType type = InternalCrsId;
+ if ( authName == "epsg" ) type = EpsgCrsId;
+ if ( authName == "postgis" ) type = PostgisCrsId;
+ long id = reCrsId.cap( 2 ).toLong();
+ result = createFromId( id, type );
}
else
{
- QRegExp reCrsStr("^(?:(wkt|proj4)\\:)?(.+)$",Qt::CaseInsensitive);
- if( reCrsStr.indexIn(theDefinition) == 0 )
+ QRegExp reCrsStr( "^(?:(wkt|proj4)\\:)?(.+)$", Qt::CaseInsensitive );
+ if ( reCrsStr.indexIn( theDefinition ) == 0 )
+ {
+ if ( reCrsStr.cap( 1 ).toLower() == "proj4" )
{
- if( reCrsStr.cap(1).toLower() == "proj4" )
- {
- result = createFromProj4(reCrsStr.cap(2));
- }
- else
- {
- result = createFromWkt(reCrsStr.cap(2));
- }
+ result = createFromProj4( reCrsStr.cap( 2 ) );
}
+ else
+ {
+ result = createFromWkt( reCrsStr.cap( 2 ) );
+ }
+ }
}
return result;
}
Modified: trunk/qgis/src/core/qgscoordinatereferencesystem.h
===================================================================
--- trunk/qgis/src/core/qgscoordinatereferencesystem.h 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/core/qgscoordinatereferencesystem.h 2011-02-20 22:35:13 UTC (rev 15227)
@@ -57,7 +57,7 @@
~QgsCoordinateReferenceSystem();
/*!
- * Constructs a CRS object from a string definition as defined in the createFromString
+ * Constructs a CRS object from a string definition as defined in the createFromString
* member function (by default a WKT definition).
* @param theDefinition A String containing a coordinate reference system definition.
*/
@@ -162,7 +162,7 @@
* @return bool TRUE if sucess else false
*/
bool createFromProj4( const QString theProjString );
-
+
/*! Set up this srs from a string definition, by default a WKT definition. Otherwise
* the string defines a authority, followed by a colon, followed by the definition.
* The authority can be one of "epsg", "postgis", "internal" for integer definitions,
Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -235,13 +235,13 @@
}
// wait
- if( mDrawing )
+ if ( mDrawing )
{
QgsDebugMsg( "already rendering" );
QCoreApplication::processEvents();
}
- if( mDrawing )
+ if ( mDrawing )
{
QgsDebugMsg( "still rendering - skipping" );
return;
@@ -381,7 +381,7 @@
split = splitLayersExtent( ml, r1, r2 );
ct = new QgsCoordinateTransform( ml->srs(), *mDestCRS );
mRenderContext.setExtent( r1 );
- if( !r1.isFinite() || !r2.isFinite() ) //there was a problem transforming the extent. Skip the layer
+ if ( !r1.isFinite() || !r2.isFinite() ) //there was a problem transforming the extent. Skip the layer
{
continue;
}
Modified: trunk/qgis/src/core/qgspallabeling.cpp
===================================================================
--- trunk/qgis/src/core/qgspallabeling.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/core/qgspallabeling.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -578,7 +578,7 @@
if ( distance != 0 )
{
- if( distInMapUnits ) //convert distance from mm/map units to pixels
+ if ( distInMapUnits ) //convert distance from mm/map units to pixels
{
distance /= context.mapToPixel().mapUnitsPerPixel();
}
Modified: trunk/qgis/src/core/spatialindex/include/Tools.h
===================================================================
--- trunk/qgis/src/core/spatialindex/include/Tools.h 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/core/spatialindex/include/Tools.h 2011-02-20 22:35:13 UTC (rev 15227)
@@ -316,7 +316,7 @@
// since all base classes are interfaces (there is no state involved) all
// inheritance can be virtual for efficiency.
- interface IShape : public virtual ISerializable
+ interface IShape : public virtual ISerializable
{
public:
virtual bool intersectsShape( const IShape& in ) const = 0;
@@ -332,7 +332,7 @@
// since all base classes are interfaces (there is no state involved) all
// inheritance can be virtual for efficiency.
- interface ITimeShape : public virtual IShape, public virtual IInterval
+ interface ITimeShape : public virtual IShape, public virtual IInterval
{
public:
virtual bool intersectsShapeInTime( const ITimeShape& in ) const = 0;
@@ -350,7 +350,7 @@
// since all base classes are interfaces (there is no state involved) all
// inheritance can be virtual for efficiency.
- interface IEvolvingShape : public virtual IShape
+ interface IEvolvingShape : public virtual IShape
{
public:
virtual void getVMBR( Region& out ) const = 0;
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -423,7 +423,7 @@
else //use the map view
{
QPixmap *pixmap = dynamic_cast<QPixmap *>( &mMap->paintDevice() );
- if( !pixmap )
+ if ( !pixmap )
return;
pixmap->save( theFileName, theFormat.toLocal8Bit().data() );
@@ -1237,7 +1237,7 @@
QPixmap& QgsMapCanvas::canvasPixmap()
{
QPixmap *pixmap = dynamic_cast<QPixmap *>( &canvasPaintDevice() );
- if( pixmap )
+ if ( pixmap )
{
return *pixmap;
}
@@ -1247,7 +1247,7 @@
static QPixmap staticPixmap;
QImage *image = dynamic_cast<QImage *>( &mMap->paintDevice() );
- if( image )
+ if ( image )
{
staticPixmap = QPixmap::fromImage( *image );
}
Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -90,7 +90,7 @@
void QgsMapOverviewCanvas::paintEvent( QPaintEvent* pe )
{
- if( mNewSize.isValid() )
+ if ( mNewSize.isValid() )
{
mPixmap = QPixmap( mNewSize );
mMapRenderer->setOutputSize( mNewSize, mPixmap.logicalDpiX() );
Modified: trunk/qgis/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -12,36 +12,36 @@
// delegate used from Qt Spin Box example
class SpinBoxDelegate : public QItemDelegate
{
-public:
- SpinBoxDelegate(QObject *parent = 0) : QItemDelegate(parent) {}
+ public:
+ SpinBoxDelegate( QObject *parent = 0 ) : QItemDelegate( parent ) {}
- QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem & /*option*/, const QModelIndex &/*index*/) const
+ QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem & /*option*/, const QModelIndex &/*index*/ ) const
{
- QSpinBox *editor = new QSpinBox(parent);
- editor->setMinimum(0);
- editor->setMaximum(999);
- return editor;
+ QSpinBox *editor = new QSpinBox( parent );
+ editor->setMinimum( 0 );
+ editor->setMaximum( 999 );
+ return editor;
}
- void setEditorData(QWidget *editor, const QModelIndex &index) const
+ void setEditorData( QWidget *editor, const QModelIndex &index ) const
{
- int value = index.model()->data(index, Qt::EditRole).toInt();
- QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
- spinBox->setValue(value);
+ int value = index.model()->data( index, Qt::EditRole ).toInt();
+ QSpinBox *spinBox = static_cast<QSpinBox*>( editor );
+ spinBox->setValue( value );
}
- void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
+ void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const
{
- QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
- spinBox->interpretText();
- int value = spinBox->value();
+ QSpinBox *spinBox = static_cast<QSpinBox*>( editor );
+ spinBox->interpretText();
+ int value = spinBox->value();
- model->setData(index, value, Qt::EditRole);
+ model->setData( index, value, Qt::EditRole );
}
- void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex & /*index*/) const
+ void updateEditorGeometry( QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex & /*index*/ ) const
{
- editor->setGeometry(option.rect);
+ editor->setGeometry( option.rect );
}
};
@@ -53,7 +53,7 @@
{
setupUi( this );
- tableLevels->setItemDelegate( new SpinBoxDelegate(this) );
+ tableLevels->setItemDelegate( new SpinBoxDelegate( this ) );
chkEnable->setChecked( usingSymbolLevels );
Modified: trunk/qgis/src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgssymbolv2selectordialog.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/gui/symbology-ng/qgssymbolv2selectordialog.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -41,7 +41,7 @@
QStandardItemModel* model = new QStandardItemModel( viewSymbols );
viewSymbols->setModel( model );
connect( viewSymbols, SIGNAL( clicked( const QModelIndex & ) ), this, SLOT( setSymbolFromStyle( const QModelIndex & ) ) );
- lblSymbolName->setText("");
+ lblSymbolName->setText( "" );
populateSymbolView();
updateSymbolPreview();
updateSymbolInfo();
@@ -98,7 +98,7 @@
}
QStandardItem* item = new QStandardItem( names[i] );
item->setData( names[i], Qt::UserRole ); //so we can show a label when it is clicked
- item->setText(""); //set the text to nothing and show in label when clicked rather
+ item->setText( "" ); //set the text to nothing and show in label when clicked rather
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
// create preview icon
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( s, previewSize );
Modified: trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/plugins/grass/qgsgrassmodule.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -1183,7 +1183,7 @@
painter.end();
}
}
- int buffer = height/3; // buffer around a sign
+ int buffer = height / 3; // buffer around a sign
if ( pixmaps.size() > 1 ) width += arrowWidth + 2 * buffer; // ->
if ( pixmaps.size() > 2 ) width += plusWidth + 2 * buffer; // +
Modified: trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -94,7 +94,7 @@
mRubberBand->addPoint( ul, false );
mRubberBand->addPoint( QgsPoint( ul.x(), lr.y() ), false );
mRubberBand->addPoint( lr, false );
- mRubberBand->addPoint( QgsPoint( lr.x(), ul.y() ), true ); // true to update canvas
+ mRubberBand->addPoint( QgsPoint( lr.x(), ul.y() ), true ); // true to update canvas
mRubberBand->show();
}
@@ -231,7 +231,7 @@
mUpdatingGui = true;
- QgsDebugMsg( "entered." );
+ QgsDebugMsg( "entered." );
mNorth->setText( QString( "%1" ).arg( mWindow.north, 0, 'g', 15 ) );
mSouth->setText( QString( "%1" ).arg( mWindow.south, 0, 'g', 15 ) );
@@ -304,7 +304,7 @@
if ( mUpdatingGui ) return;
mWindow.ns_res = mNSRes->text().toDouble();
- if ( mWindow.ns_res <= 0)
+ if ( mWindow.ns_res <= 0 )
mWindow.ns_res = 1;
adjust();
@@ -316,7 +316,7 @@
if ( mUpdatingGui ) return;
mWindow.ew_res = mEWRes->text().toDouble();
- if ( mWindow.ew_res <= 0)
+ if ( mWindow.ew_res <= 0 )
mWindow.ew_res = 1;
adjust();
@@ -328,7 +328,7 @@
if ( mUpdatingGui ) return;
mWindow.rows = mRows->text().toInt();
- if ( mWindow.rows < 1)
+ if ( mWindow.rows < 1 )
mWindow.rows = 1;
adjust();
@@ -340,7 +340,7 @@
if ( mUpdatingGui ) return;
mWindow.cols = mCols->text().toInt();
- if ( mWindow.cols < 1)
+ if ( mWindow.cols < 1 )
mWindow.cols = 1;
adjust();
Modified: trunk/qgis/src/plugins/grass/qgsgrassregion.h
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassregion.h 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/plugins/grass/qgsgrassregion.h 2011-02-20 22:35:13 UTC (rev 15227)
@@ -46,7 +46,7 @@
public:
//! Constructor
QgsGrassRegion( QgsGrassPlugin *plugin, QgisInterface *iface,
- QWidget * parent = 0, Qt::WFlags f = 0 );
+ QWidget * parent = 0, Qt::WFlags f = 0 );
//! Destructor
~QgsGrassRegion();
Modified: trunk/qgis/src/plugins/grass/qgsgrassselect.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassselect.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/plugins/grass/qgsgrassselect.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -170,7 +170,7 @@
{
elocation->setCurrentIndex( sel );
}
- buttonBox->button(QDialogButtonBox::Ok)->setDefault( true );
+ buttonBox->button( QDialogButtonBox::Ok )->setDefault( true );
GisdbaseBrowse->setDefault( elocation->count() == 0 );
setMapsets();
@@ -213,7 +213,7 @@
}
if ( emap->isHidden() )
{
- buttonBox->button(QDialogButtonBox::Ok)->setDefault( emapset->count() > 0 );
+ buttonBox->button( QDialogButtonBox::Ok )->setDefault( emapset->count() > 0 );
}
setMaps();
@@ -308,7 +308,7 @@
*/
if ( !emap->isHidden() )
{
- buttonBox->button(QDialogButtonBox::Ok)->setDefault( emap->count() > 0 );
+ buttonBox->button( QDialogButtonBox::Ok )->setDefault( emap->count() > 0 );
}
setLayers();
Modified: trunk/qgis/src/plugins/offline_editing/offline_editing_plugin_gui.cpp
===================================================================
--- trunk/qgis/src/plugins/offline_editing/offline_editing_plugin_gui.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/src/plugins/offline_editing/offline_editing_plugin_gui.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -77,17 +77,17 @@
bool showLayer = true;
if ( filterEditableLayers )
{
- int cap = layer->dataProvider()->capabilities();
- showLayer = ( cap & QgsVectorDataProvider::AddFeatures ) &&
- ( cap & QgsVectorDataProvider::DeleteFeatures ) &&
- ( cap & QgsVectorDataProvider::ChangeAttributeValues ) &&
- ( cap & QgsVectorDataProvider::AddAttributes ) &&
- ( cap & QgsVectorDataProvider::ChangeGeometries );
+ int cap = layer->dataProvider()->capabilities();
+ showLayer = ( cap & QgsVectorDataProvider::AddFeatures ) &&
+ ( cap & QgsVectorDataProvider::DeleteFeatures ) &&
+ ( cap & QgsVectorDataProvider::ChangeAttributeValues ) &&
+ ( cap & QgsVectorDataProvider::AddAttributes ) &&
+ ( cap & QgsVectorDataProvider::ChangeGeometries );
}
if ( showLayer )
{
- QListWidgetItem* item = new QListWidgetItem( layer->name(), ui_layerList );
- item->setData( Qt::UserRole, QVariant( layer_it.key() ) );
+ QListWidgetItem* item = new QListWidgetItem( layer->name(), ui_layerList );
+ item->setData( Qt::UserRole, QVariant( layer_it.key() ) );
}
}
}
@@ -111,7 +111,7 @@
void QgsOfflineEditingPluginGui::on_checkboxShowEditableLayers_stateChanged( int state )
{
- updateLayerList( checkboxShowEditableLayers->checkState() == Qt::Checked );
+ updateLayerList( checkboxShowEditableLayers->checkState() == Qt::Checked );
}
void QgsOfflineEditingPluginGui::on_buttonBox_accepted()
Modified: trunk/qgis/tests/src/core/regression992.cpp
===================================================================
--- trunk/qgis/tests/src/core/regression992.cpp 2011-02-20 22:29:07 UTC (rev 15226)
+++ trunk/qgis/tests/src/core/regression992.cpp 2011-02-20 22:35:13 UTC (rev 15227)
@@ -28,11 +28,11 @@
//qgis includes...
-#include <qgsrasterlayer.h>
-#include <qgsrasterbandstats.h>
-#include <qgsmaplayerregistry.h>
+#include <qgsrasterlayer.h>
+#include <qgsrasterbandstats.h>
+#include <qgsmaplayerregistry.h>
#include <qgsapplication.h>
-#include <qgsmaprenderer.h>
+#include <qgsmaprenderer.h>
//qgis unit test includes
#include <qgsrenderchecker.h>
@@ -43,16 +43,16 @@
*/
class Regression992: public QObject
{
- Q_OBJECT;
+ Q_OBJECT;
private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
- void init(){};// will be called before each testfunction is executed.
- void cleanup(){};// will be called after every testfunction.
+ void init() {};// will be called before each testfunction is executed.
+ void cleanup() {};// will be called after every testfunction.
void regression992();
private:
- bool render(QString theFileName);
+ bool render( QString theFileName );
QString mTestDataDir;
QgsRasterLayer * mpRasterLayer;
QgsMapRenderer * mpMapRenderer;
@@ -63,55 +63,55 @@
void Regression992::initTestCase()
{
// init QGIS's paths - true means that all path will be inited from prefix
- QString qgisPath = QCoreApplication::applicationDirPath ();
- QgsApplication::setPrefixPath(INSTALL_PREFIX, true);
+ QString qgisPath = QCoreApplication::applicationDirPath();
+ QgsApplication::setPrefixPath( INSTALL_PREFIX, true );
QgsApplication::showSettings();
//create some objects that will be used in all tests...
//create a raster layer that will be used in all tests...
- mTestDataDir = QString(TEST_DATA_DIR) + QDir::separator(); //defined in CMakeLists.txt
+ mTestDataDir = QString( TEST_DATA_DIR ) + QDir::separator(); //defined in CMakeLists.txt
QString myFileName = mTestDataDir + "rgbwcmyk01_YeGeo.jp2";
- QFileInfo myRasterFileInfo ( myFileName );
- mpRasterLayer = new QgsRasterLayer ( myRasterFileInfo.filePath(),
- myRasterFileInfo.completeBaseName() );
+ QFileInfo myRasterFileInfo( myFileName );
+ mpRasterLayer = new QgsRasterLayer( myRasterFileInfo.filePath(),
+ myRasterFileInfo.completeBaseName() );
// Register the layer with the registry
- QgsMapLayerRegistry::instance()->addMapLayer(mpRasterLayer);
+ QgsMapLayerRegistry::instance()->addMapLayer( mpRasterLayer );
// add the test layer to the maprender
mpMapRenderer = new QgsMapRenderer();
QStringList myLayers;
myLayers << mpRasterLayer->id();
- mpMapRenderer->setLayerSet(myLayers);
+ mpMapRenderer->setLayerSet( myLayers );
mReport += "<h1>Regression 992 Test</h1>\n";
mReport += "<p>See <a href=\"https://trac.osgeo.org/qgis/ticket/992\">"
- "trac ticket 992</a> for more details.</p>";
+ "trac ticket 992</a> for more details.</p>";
}
//runs after all tests
void Regression992::cleanupTestCase()
{
QString myReportFile = QDir::tempPath() + QDir::separator() + "regression992.html";
- QFile myFile ( myReportFile);
- if ( myFile.open ( QIODevice::WriteOnly ) )
+ QFile myFile( myReportFile );
+ if ( myFile.open( QIODevice::WriteOnly ) )
{
- QTextStream myQTextStream ( &myFile );
+ QTextStream myQTextStream( &myFile );
myQTextStream << mReport;
myFile.close();
- QDesktopServices::openUrl("file://"+myReportFile);
+ QDesktopServices::openUrl( "file://" + myReportFile );
}
}
void Regression992::regression992()
{
- QVERIFY ( mpRasterLayer->isValid() );
- mpMapRenderer->setExtent(mpRasterLayer->extent());
- QString myDataDir (TEST_DATA_DIR); //defined in CmakeLists.txt
+ QVERIFY( mpRasterLayer->isValid() );
+ mpMapRenderer->setExtent( mpRasterLayer->extent() );
+ QString myDataDir( TEST_DATA_DIR ); //defined in CmakeLists.txt
QString myTestDataDir = myDataDir + QDir::separator();
QgsRenderChecker myChecker;
- myChecker.setExpectedImage ( myTestDataDir + "expected_rgbwcmyk01_YeGeo.jp2.png" );
- myChecker.setMapRenderer ( mpMapRenderer );
- bool myResultFlag = myChecker.runTest("regression992");
+ myChecker.setExpectedImage( myTestDataDir + "expected_rgbwcmyk01_YeGeo.jp2.png" );
+ myChecker.setMapRenderer( mpMapRenderer );
+ bool myResultFlag = myChecker.runTest( "regression992" );
mReport += "\n\n\n" + myChecker.report();
- QVERIFY(myResultFlag);
+ QVERIFY( myResultFlag );
}
-QTEST_MAIN(Regression992)
+QTEST_MAIN( Regression992 )
#include "moc_regression992.cxx"
More information about the QGIS-commit
mailing list