Skip to content

Commit

Permalink
automatic indentation update (r14312-r14435)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14436 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 26, 2010
1 parent df9ad67 commit d8ae3c1
Show file tree
Hide file tree
Showing 14 changed files with 791 additions and 789 deletions.
6 changes: 3 additions & 3 deletions src/app/legend/qgslegendlayer.cpp
Expand Up @@ -61,11 +61,11 @@ QgsLegendLayer::QgsLegendLayer( QgsMapLayer* layer )
Qt::ItemFlags flags = Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;

QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
if( !vlayer || vlayer->geometryType() != QGis::NoGeometry )
if ( !vlayer || vlayer->geometryType() != QGis::NoGeometry )
{
flags |= Qt::ItemIsUserCheckable;
}

setFlags( flags );

setCheckState( 0, Qt::Checked );
Expand Down Expand Up @@ -105,7 +105,7 @@ QgsLegendLayer::~QgsLegendLayer()

void QgsLegendLayer::setCheckState( int column, Qt::CheckState state )
{
if( flags() & Qt::ItemIsUserCheckable )
if ( flags() & Qt::ItemIsUserCheckable )
{
QTreeWidgetItem::setCheckState( column, state );
}
Expand Down
34 changes: 17 additions & 17 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -205,7 +205,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
pbtnLoadColorMapFromFile->setIcon( QgisApp::getThemeIcon( "/mActionFileOpen.png" ) );

mSaveAsImageButton->setIcon( QgisApp::getThemeIcon( "/mActionFileSave.png" ) );

mMapCanvas = theCanvas;
mPixelSelectorTool = 0;
if ( mMapCanvas )
Expand Down Expand Up @@ -1863,16 +1863,16 @@ void QgsRasterLayerProperties::refreshHistogram()
QgsDebugMsg( "entered." );
//ensure all children get removed
mpPlot->setAutoDelete( true );
mpPlot->setTitle( QObject::tr( "Raster Histogram") );
mpPlot->setTitle( QObject::tr( "Raster Histogram" ) );
mpPlot->insertLegend( new QwtLegend(), QwtPlot::BottomLegend );
// Set axis titles
mpPlot->setAxisTitle( QwtPlot::xBottom, QObject::tr("Pixel Value") );
mpPlot->setAxisTitle( QwtPlot::yLeft, QObject::tr("Frequency") );
mpPlot->setAxisTitle( QwtPlot::xBottom, QObject::tr( "Pixel Value" ) );
mpPlot->setAxisTitle( QwtPlot::yLeft, QObject::tr( "Frequency" ) );
mpPlot->setAxisAutoScale( QwtPlot::yLeft );
// x axis scale only set after computing global min/max across bands (see below)
// add a grid
QwtPlotGrid * myGrid = new QwtPlotGrid();
myGrid->attach(mpPlot);
myGrid->attach( mpPlot );
// Explanation:
// We use the gdal histogram creation routine is called for each selected
// layer. Currently the hist is hardcoded
Expand Down Expand Up @@ -1921,8 +1921,8 @@ void QgsRasterLayerProperties::refreshHistogram()
myX2Data.append( double( myBin ) );
myY2Data.append( double( myBinValue ) );
}
mypCurve->setData(myX2Data,myY2Data);
mypCurve->attach(mpPlot);
mypCurve->setData( myX2Data, myY2Data );
mypCurve->attach( mpPlot );
if ( myFirstIteration || myGlobalMin < myRasterBandStats.minimumValue )
{
myGlobalMin = myRasterBandStats.minimumValue;
Expand All @@ -1936,13 +1936,13 @@ void QgsRasterLayerProperties::refreshHistogram()
// for x axis use band pixel values rather than gdal hist. bin values
// subtract -0.5 to prevent rounding errors
// see http://www.gdal.org/classGDALRasterBand.html#3f8889607d3b2294f7e0f11181c201c8
mpPlot->setAxisScale ( QwtPlot::xBottom,
myGlobalMin - 0.5,
myGlobalMax + 0.5 );
mpPlot->setAxisScale( QwtPlot::xBottom,
myGlobalMin - 0.5,
myGlobalMax + 0.5 );
mpPlot->replot();
disconnect( mRasterLayer, SIGNAL( progressUpdate( int ) ), mHistogramProgress, SLOT( setValue( int ) ) );
mHistogramProgress->hide();
mpPlot->canvas()->setCursor(Qt::ArrowCursor);
mpPlot->canvas()->setCursor( Qt::ArrowCursor );
QApplication::restoreOverrideCursor();
}

Expand All @@ -1952,18 +1952,18 @@ void QgsRasterLayerProperties::on_mSaveAsImageButton_clicked()
{
return;
}
QPixmap myPixmap(600, 600);
myPixmap.fill(Qt::white); // Qt::transparent ?

QPixmap myPixmap( 600, 600 );
myPixmap.fill( Qt::white ); // Qt::transparent ?

QwtPlotPrintFilter myFilter;
int myOptions = QwtPlotPrintFilter::PrintAll;
myOptions &= ~QwtPlotPrintFilter::PrintBackground;
myOptions |= QwtPlotPrintFilter::PrintFrameWithScales;
myFilter.setOptions(myOptions);
myFilter.setOptions( myOptions );

mpPlot->print(myPixmap, myFilter);
QPair< QString,QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
mpPlot->print( myPixmap, myFilter );
QPair< QString, QString> myFileNameAndFilter = QgisGui::getSaveAsImageName( this, tr( "Choose a file name to save the map image as" ) );
if ( myFileNameAndFilter.first != "" )
{
myPixmap.save( myFileNameAndFilter.first );
Expand Down
12 changes: 6 additions & 6 deletions src/app/qgsspatialitesourceselect.cpp
Expand Up @@ -700,7 +700,7 @@ bool QgsSpatiaLiteSourceSelect::checkVirtsGeometryColumns( sqlite3 * handle )
return exists;
}

bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource (sqlite3 * handle, const char *table)
bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource( sqlite3 * handle, const char *table )
{
// testing for RasterLite-1 datasources
int ret;
Expand All @@ -713,12 +713,12 @@ bool QgsSpatiaLiteSourceSelect::isRasterlite1Datasource (sqlite3 * handle, const
char table_raster[4192];
char sql[4192];

strcpy ( table_raster, table );
strcpy( table_raster, table );
len = strlen( table_raster );
if (strlen( table_raster ) < 9)
return false;
if (strcmp( table_raster + len - 9, "_metadata" ) != 0)
return false;
if ( strlen( table_raster ) < 9 )
return false;
if ( strcmp( table_raster + len - 9, "_metadata" ) != 0 )
return false;
// ok, possible candidate
strcpy( table_raster + len - 9, "_rasters" );

Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrasterlayer.h
Expand Up @@ -619,7 +619,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer

/** \brief Draws a thumbnail of the rasterlayer into the supplied pixmap pointer */
void thumbnailAsPixmap( QPixmap * theQPixmap );
/** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
/** \brief Draws a thumbnail of the rasterlayer into the supplied QImage pointer
* @note added in QGIS 1.6
* */
void thumbnailAsImage( QImage * thepImage );
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Expand Up @@ -327,10 +327,10 @@ static QList<double> _calcQuantileBreaks( QList<double> values, int classes )

for ( int i = 1; i < classes; i++ )
{
if( n > 1 )
if ( n > 1 )
{
double q = i / ( double ) classes;
double a = q * (n-1);
double a = q * ( n - 1 );
int aa = ( int )( a );

double r = a - aa;
Expand Down
8 changes: 4 additions & 4 deletions src/gui/qgisgui.cpp
Expand Up @@ -38,7 +38,7 @@ namespace QgisGui

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

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

Expand Down Expand Up @@ -129,8 +129,8 @@ namespace QgisGui

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

// allow for selection of more than one file
myQFileDialog->setFileMode( QFileDialog::AnyFile );
Expand Down Expand Up @@ -168,7 +168,7 @@ namespace QgisGui
myPair.first = myOutputFileName;
myPair.second = myFilterMap[myFilterString];
return myPair;
} //
} //

QString createFileFilter_( QString const &longName, QString const &glob )
{
Expand Down
6 changes: 3 additions & 3 deletions src/gui/qgisgui.h
Expand Up @@ -76,16 +76,16 @@ namespace QgisGui
QString const &filters, QStringList & selectedFiles, QString& enc, QString &title,
bool cancelAll = false );

/** A helper function to get an image name from the user. It will nicely
/** A helper function to get an image name from the user. It will nicely
* provide filters with all available writable image formats.
* @param QWidget - widget that should act as the parent for the file dialog
* @param QString the message to display to the user
* @return QPair<QString, QString> where first is the file name and second is
* the file type
* @note added in 1.6
*/
QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage );
QPair<QString, QString> GUI_EXPORT getSaveAsImageName( QWidget * theParent, QString theMessage );

/**
Convenience function for readily creating file filters.
Expand Down

0 comments on commit d8ae3c1

Please sign in to comment.