@@ -205,7 +205,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
205
205
pbtnLoadColorMapFromFile->setIcon ( QgisApp::getThemeIcon ( " /mActionFileOpen.png" ) );
206
206
207
207
mSaveAsImageButton ->setIcon ( QgisApp::getThemeIcon ( " /mActionFileSave.png" ) );
208
-
208
+
209
209
mMapCanvas = theCanvas;
210
210
mPixelSelectorTool = 0 ;
211
211
if ( mMapCanvas )
@@ -1863,16 +1863,16 @@ void QgsRasterLayerProperties::refreshHistogram()
1863
1863
QgsDebugMsg ( " entered." );
1864
1864
// ensure all children get removed
1865
1865
mpPlot->setAutoDelete ( true );
1866
- mpPlot->setTitle ( QObject::tr ( " Raster Histogram" ) );
1866
+ mpPlot->setTitle ( QObject::tr ( " Raster Histogram" ) );
1867
1867
mpPlot->insertLegend ( new QwtLegend (), QwtPlot::BottomLegend );
1868
1868
// 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" ) );
1871
1871
mpPlot->setAxisAutoScale ( QwtPlot::yLeft );
1872
1872
// x axis scale only set after computing global min/max across bands (see below)
1873
1873
// add a grid
1874
1874
QwtPlotGrid * myGrid = new QwtPlotGrid ();
1875
- myGrid->attach (mpPlot);
1875
+ myGrid->attach ( mpPlot );
1876
1876
// Explanation:
1877
1877
// We use the gdal histogram creation routine is called for each selected
1878
1878
// layer. Currently the hist is hardcoded
@@ -1921,8 +1921,8 @@ void QgsRasterLayerProperties::refreshHistogram()
1921
1921
myX2Data.append ( double ( myBin ) );
1922
1922
myY2Data.append ( double ( myBinValue ) );
1923
1923
}
1924
- mypCurve->setData (myX2Data,myY2Data);
1925
- mypCurve->attach (mpPlot);
1924
+ mypCurve->setData ( myX2Data, myY2Data );
1925
+ mypCurve->attach ( mpPlot );
1926
1926
if ( myFirstIteration || myGlobalMin < myRasterBandStats.minimumValue )
1927
1927
{
1928
1928
myGlobalMin = myRasterBandStats.minimumValue ;
@@ -1936,13 +1936,13 @@ void QgsRasterLayerProperties::refreshHistogram()
1936
1936
// for x axis use band pixel values rather than gdal hist. bin values
1937
1937
// subtract -0.5 to prevent rounding errors
1938
1938
// 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 );
1942
1942
mpPlot->replot ();
1943
1943
disconnect ( mRasterLayer , SIGNAL ( progressUpdate ( int ) ), mHistogramProgress , SLOT ( setValue ( int ) ) );
1944
1944
mHistogramProgress ->hide ();
1945
- mpPlot->canvas ()->setCursor (Qt::ArrowCursor);
1945
+ mpPlot->canvas ()->setCursor ( Qt::ArrowCursor );
1946
1946
QApplication::restoreOverrideCursor ();
1947
1947
}
1948
1948
@@ -1952,18 +1952,18 @@ void QgsRasterLayerProperties::on_mSaveAsImageButton_clicked()
1952
1952
{
1953
1953
return ;
1954
1954
}
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 ?
1958
1958
1959
1959
QwtPlotPrintFilter myFilter;
1960
1960
int myOptions = QwtPlotPrintFilter::PrintAll;
1961
1961
myOptions &= ~QwtPlotPrintFilter::PrintBackground;
1962
1962
myOptions |= QwtPlotPrintFilter::PrintFrameWithScales;
1963
- myFilter.setOptions (myOptions);
1963
+ myFilter.setOptions ( myOptions );
1964
1964
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" ) );
1967
1967
if ( myFileNameAndFilter.first != " " )
1968
1968
{
1969
1969
myPixmap.save ( myFileNameAndFilter.first );
0 commit comments