Skip to content
Permalink
Browse files

automatic indentation update (r14312-r14435)

git-svn-id: http://svn.osgeo.org/qgis/trunk@14436 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Oct 26, 2010
1 parent 510d425 commit b440e1ebe86a0e7eeda86001ca59963188faca3f
@@ -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 );
@@ -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 );
}
@@ -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 )
@@ -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
@@ -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;
@@ -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();
}

@@ -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 );
@@ -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;
@@ -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" );

@@ -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 );
@@ -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;
@@ -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();

@@ -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 );
@@ -168,7 +168,7 @@ namespace QgisGui
myPair.first = myOutputFileName;
myPair.second = myFilterMap[myFilterString];
return myPair;
} //
} //

QString createFileFilter_( QString const &longName, QString const &glob )
{
@@ -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.

0 comments on commit b440e1e

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