Skip to content

Commit d8ae3c1

Browse files
author
jef
committed
automatic indentation update (r14312-r14435)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14436 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent df9ad67 commit d8ae3c1

14 files changed

+791
-789
lines changed

src/app/legend/qgslegendlayer.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ QgsLegendLayer::QgsLegendLayer( QgsMapLayer* layer )
6161
Qt::ItemFlags flags = Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
6262

6363
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
64-
if( !vlayer || vlayer->geometryType() != QGis::NoGeometry )
64+
if ( !vlayer || vlayer->geometryType() != QGis::NoGeometry )
6565
{
6666
flags |= Qt::ItemIsUserCheckable;
6767
}
68-
68+
6969
setFlags( flags );
7070

7171
setCheckState( 0, Qt::Checked );
@@ -105,7 +105,7 @@ QgsLegendLayer::~QgsLegendLayer()
105105

106106
void QgsLegendLayer::setCheckState( int column, Qt::CheckState state )
107107
{
108-
if( flags() & Qt::ItemIsUserCheckable )
108+
if ( flags() & Qt::ItemIsUserCheckable )
109109
{
110110
QTreeWidgetItem::setCheckState( column, state );
111111
}

src/app/qgsrasterlayerproperties.cpp

+17-17
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
205205
pbtnLoadColorMapFromFile->setIcon( QgisApp::getThemeIcon( "/mActionFileOpen.png" ) );
206206

207207
mSaveAsImageButton->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );
208-
208+
209209
mMapCanvas = theCanvas;
210210
mPixelSelectorTool = 0;
211211
if ( mMapCanvas )
@@ -1863,16 +1863,16 @@ void QgsRasterLayerProperties::refreshHistogram()
18631863
QgsDebugMsg( "entered." );
18641864
//ensure all children get removed
18651865
mpPlot->setAutoDelete( true );
1866-
mpPlot->setTitle( QObject::tr( "Raster Histogram") );
1866+
mpPlot->setTitle( QObject::tr( "Raster Histogram" ) );
18671867
mpPlot->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );
18681868
// Set axis titles
1869-
mpPlot->setAxisTitle( QwtPlot::xBottom, QObject::tr("Pixel Value") );
1870-
mpPlot->setAxisTitle( QwtPlot::yLeft, QObject::tr("Frequency") );
1869+
mpPlot->setAxisTitle( QwtPlot::xBottom, QObject::tr( "Pixel Value" ) );
1870+
mpPlot->setAxisTitle( QwtPlot::yLeft, QObject::tr( "Frequency" ) );
18711871
mpPlot->setAxisAutoScale( QwtPlot::yLeft );
18721872
// x axis scale only set after computing global min/max across bands (see below)
18731873
// add a grid
18741874
QwtPlotGrid * myGrid = new QwtPlotGrid();
1875-
myGrid->attach(mpPlot);
1875+
myGrid->attach( mpPlot );
18761876
// Explanation:
18771877
// We use the gdal histogram creation routine is called for each selected
18781878
// layer. Currently the hist is hardcoded
@@ -1921,8 +1921,8 @@ void QgsRasterLayerProperties::refreshHistogram()
19211921
myX2Data.append( double( myBin ) );
19221922
myY2Data.append( double( myBinValue ) );
19231923
}
1924-
mypCurve->setData(myX2Data,myY2Data);
1925-
mypCurve->attach(mpPlot);
1924+
mypCurve->setData( myX2Data, myY2Data );
1925+
mypCurve->attach( mpPlot );
19261926
if ( myFirstIteration || myGlobalMin < myRasterBandStats.minimumValue )
19271927
{
19281928
myGlobalMin = myRasterBandStats.minimumValue;
@@ -1936,13 +1936,13 @@ void QgsRasterLayerProperties::refreshHistogram()
19361936
// for x axis use band pixel values rather than gdal hist. bin values
19371937
// subtract -0.5 to prevent rounding errors
19381938
// see http://www.gdal.org/classGDALRasterBand.html#3f8889607d3b2294f7e0f11181c201c8
1939-
mpPlot->setAxisScale ( QwtPlot::xBottom,
1940-
myGlobalMin - 0.5,
1941-
myGlobalMax + 0.5 );
1939+
mpPlot->setAxisScale( QwtPlot::xBottom,
1940+
myGlobalMin - 0.5,
1941+
myGlobalMax + 0.5 );
19421942
mpPlot->replot();
19431943
disconnect( mRasterLayer, SIGNAL( progressUpdate( int ) ), mHistogramProgress, SLOT( setValue( int ) ) );
19441944
mHistogramProgress->hide();
1945-
mpPlot->canvas()->setCursor(Qt::ArrowCursor);
1945+
mpPlot->canvas()->setCursor( Qt::ArrowCursor );
19461946
QApplication::restoreOverrideCursor();
19471947
}
19481948

@@ -1952,18 +1952,18 @@ void QgsRasterLayerProperties::on_mSaveAsImageButton_clicked()
19521952
{
19531953
return;
19541954
}
1955-
1956-
QPixmap myPixmap(600, 600);
1957-
myPixmap.fill(Qt::white); // Qt::transparent ?
1955+
1956+
QPixmap myPixmap( 600, 600 );
1957+
myPixmap.fill( Qt::white ); // Qt::transparent ?
19581958

19591959
QwtPlotPrintFilter myFilter;
19601960
int myOptions = QwtPlotPrintFilter::PrintAll;
19611961
myOptions &= ~QwtPlotPrintFilter::PrintBackground;
19621962
myOptions |= QwtPlotPrintFilter::PrintFrameWithScales;
1963-
myFilter.setOptions(myOptions);
1963+
myFilter.setOptions( myOptions );
19641964

1965-
mpPlot->print(myPixmap, myFilter);
1966-
QPair< QString,QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
1965+
mpPlot->print( myPixmap, myFilter );
1966+
QPair< QString, QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
19671967
if ( myFileNameAndFilter.first != "" )
19681968
{
19691969
myPixmap.save( myFileNameAndFilter.first );

src/app/qgsspatialitesourceselect.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ bool QgsSpatiaLiteSourceSelect::checkVirtsGeometryColumns( sqlite3 * handle )
700700
return exists;
701701
}
702702

703-
bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource (sqlite3 * handle, const char *table)
703+
bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource( sqlite3 * handle, const char *table )
704704
{
705705
// testing for RasterLite-1 datasources
706706
int ret;
@@ -713,12 +713,12 @@ bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource (sqlite3 * handle, const
713713
char table_raster[4192];
714714
char sql[4192];
715715

716-
strcpy ( table_raster, table );
716+
strcpy( table_raster, table );
717717
len = strlen( table_raster );
718-
if (strlen( table_raster ) < 9)
719-
return false;
720-
if (strcmp( table_raster + len - 9, "_metadata" ) != 0)
721-
return false;
718+
if ( strlen( table_raster ) < 9 )
719+
return false;
720+
if ( strcmp( table_raster + len - 9, "_metadata" ) != 0 )
721+
return false;
722722
// ok, possible candidate
723723
strcpy( table_raster + len - 9, "_rasters" );
724724

src/core/raster/qgsrasterlayer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
619619

620620
/** \brief Draws a thumbnail of the rasterlayer into the supplied pixmap pointer */
621621
void thumbnailAsPixmap( QPixmap * theQPixmap );
622-
/** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
622+
/** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
623623
* @note added in QGIS 1.6
624624
* */
625625
void thumbnailAsImage( QImage * thepImage );

src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ static QList<double> _calcQuantileBreaks( QList<double> values, int classes )
327327

328328
for ( int i = 1; i < classes; i++ )
329329
{
330-
if( n > 1 )
330+
if ( n > 1 )
331331
{
332332
double q = i / ( double ) classes;
333-
double a = q * (n-1);
333+
double a = q * ( n - 1 );
334334
int aa = ( int )( a );
335335

336336
double r = a - aa;

src/gui/qgisgui.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace QgisGui
3838

3939
haveLastUsedFilter = settings.contains( "/UI/" + filterName );
4040
QString lastUsedFilter = settings.value( "/UI/" + filterName,
41-
QVariant( QString::null ) ).toString();
41+
QVariant( QString::null ) ).toString();
4242

4343
QString lastUsedDir = settings.value( "/UI/" + filterName + "Dir", "." ).toString();
4444

@@ -129,8 +129,8 @@ namespace QgisGui
129129

130130
//create a file dialog using the the filter list generated above
131131
std::auto_ptr < QFileDialog > myQFileDialog( new QFileDialog( theParent,
132-
QObject::tr( "Choose a file name to save the map image as" ),
133-
myLastUsedDir, myFilters ) );
132+
QObject::tr( "Choose a file name to save the map image as" ),
133+
myLastUsedDir, myFilters ) );
134134

135135
// allow for selection of more than one file
136136
myQFileDialog->setFileMode( QFileDialog::AnyFile );
@@ -168,7 +168,7 @@ namespace QgisGui
168168
myPair.first = myOutputFileName;
169169
myPair.second = myFilterMap[myFilterString];
170170
return myPair;
171-
} //
171+
} //
172172

173173
QString createFileFilter_( QString const &longName, QString const &glob )
174174
{

src/gui/qgisgui.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ namespace QgisGui
7676
QString const &filters, QStringList & selectedFiles, QString& enc, QString &title,
7777
bool cancelAll = false );
7878

79-
/** A helper function to get an image name from the user. It will nicely
79+
/** A helper function to get an image name from the user. It will nicely
8080
* provide filters with all available writable image formats.
8181
* @param QWidget - widget that should act as the parent for the file dialog
8282
* @param QString the message to display to the user
8383
* @return QPair<QString, QString> where first is the file name and second is
8484
* the file type
8585
* @note added in 1.6
8686
*/
87-
QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage );
88-
87+
QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage );
88+
8989
/**
9090
9191
Convenience function for readily creating file filters.

0 commit comments

Comments
 (0)