Skip to content

Commit 01cb953

Browse files
committedJun 22, 2012
Remove symbology related member variables and functions from raster layer
1 parent 86e9129 commit 01cb953

File tree

5 files changed

+46
-811
lines changed

5 files changed

+46
-811
lines changed
 

‎python/core/qgsrasterlayer.sip

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ public:
145145
DrawingStyle drawingStyle();
146146

147147
/** \brief Accessor for gray band name mapping */
148-
QString grayBandName() const;
148+
//QString grayBandName() const; //removed with raster redesign
149149

150150
/** \brief Accessor for green band name mapping */
151-
QString greenBandName() const;
151+
//QString greenBandName() const; //removed with raster redesign
152152

153153
/** \brief Accessor for mHasPyramids (READ ONLY) */
154154
bool hasPyramids();
@@ -163,31 +163,31 @@ public:
163163
int height();
164164

165165
/** \brief Accessor to find out whether the histogram should be inverted */
166-
bool invertHistogram() const;
166+
//bool invertHistogram() const; //removed with raster redesign
167167

168168
/** \brief Is the NoDataValue Valid */
169169
bool isNoDataValueValid() const;
170170

171171
/** \brief Accessor for mGrayMinimumMaximumEstimated */
172-
bool isGrayMinimumMaximumEstimated() const;
172+
//bool isGrayMinimumMaximumEstimated() const; //removed with raster redesign
173173

174174
/** \brief Accessor for mRGBMinimumMaximumEstimated */
175-
bool isRGBMinimumMaximumEstimated() const;
175+
//bool isRGBMinimumMaximumEstimated() const; //removed with raster redesign
176176

177177
/** \brief Accessor that returns the NO_DATA entry for this raster */
178178
double noDataValue( bool* isValid = 0 );
179179

180180
/** \brief Returns a pointer to the transparency object */
181-
QgsRasterTransparency* rasterTransparency();
181+
//QgsRasterTransparency* rasterTransparency(); //removed with raster redesign
182182

183183
/** \brief Accessor for raster shader */
184-
QgsRasterShader* rasterShader();
184+
//QgsRasterShader* rasterShader(); //removed with raster redesign
185185

186186
/** \brief Accessor for raster layer type (which is a read only property) */
187187
LayerType rasterType();
188188

189189
/** \brief Accessor for red band name (allows alternate mappings e.g. map blue as red color) */
190-
QString redBandName();
190+
//QString redBandName(); //removed with raster redesign
191191

192192
/** [ data provider interface ] Set the data provider */
193193
void setDataProvider( const QString & provider );
@@ -196,22 +196,22 @@ public:
196196
void setDrawingStyle( const DrawingStyle & theDrawingStyle );
197197

198198
/** \brief Mutator for mGrayMinimumMaximumEstimated */
199-
void setGrayMinimumMaximumEstimated( bool theBool );
199+
//void setGrayMinimumMaximumEstimated( bool theBool ); //removed with raster redesign
200200

201201
/** \brief Mutator to alter the state of the invert histogram flag */
202-
void setInvertHistogram( bool theFlag );
202+
//void setInvertHistogram( bool theFlag ); //removed with raster redesign
203203

204204
/** \brief Mutator for mRGBMinimumMaximumEstimated */
205-
void setRGBMinimumMaximumEstimated( bool theBool );
205+
//void setRGBMinimumMaximumEstimated( bool theBool ); //removed with raster redesign
206206

207207
/** \brief Mutator to alter the number of standard deviations that should be plotted */
208-
void setStandardDeviations( double theStdDevsToPlot );
208+
//void setStandardDeviations( double theStdDevsToPlot ); //removed with raster redesign
209209

210210
/** \brief Mutator for mUserDefinedGrayMinimumMaximum */
211-
void setUserDefinedGrayMinimumMaximum( bool theBool );
211+
//void setUserDefinedGrayMinimumMaximum( bool theBool ); //removed with raster redesign
212212

213213
/** \brief Mutator for mUserDefinedRGBMinimumMaximum */
214-
void setUserDefinedRGBMinimumMaximum( bool theBool );
214+
//void setUserDefinedRGBMinimumMaximum( bool theBool ); //removed with raster redesign
215215

216216
/**Set raster renderer. Takes ownership of the renderer object*/
217217
void setRenderer( QgsRasterRenderer* renderer );
@@ -221,7 +221,7 @@ public:
221221
double standardDeviations() const;
222222

223223
/** \brief Accessor for transparent band name mapping */
224-
QString transparentBandName() const;
224+
//QString transparentBandName() const; //removed with raster redesign
225225

226226
/** \brief [ data provider interface ] Does this layer use a provider for setting/retrieving data?
227227
* @deprecated in 2.0

‎src/app/qgsrasterlayerproperties.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -471,17 +471,18 @@ void QgsRasterLayerProperties::sync()
471471
sliderTransparency->setValue(( 1.0 - renderer->opacity() ) * 255 );
472472
//update the transparency percentage label
473473
sliderTransparency_valueChanged(( 1.0 - renderer->opacity() ) * 255 );
474-
}
475474

476-
int myIndex = cboxTransparencyBand->findText( mRasterLayer->transparentBandName() );
477-
if ( -1 != myIndex )
478-
{
479-
cboxTransparencyBand->setCurrentIndex( myIndex );
480-
}
481-
else
482-
{
483-
cboxTransparencyBand->setCurrentIndex( cboxTransparencyBand->findText( TRSTRING_NOT_SET ) );
475+
int myIndex = renderer->alphaBand();
476+
if ( -1 != myIndex )
477+
{
478+
cboxTransparencyBand->setCurrentIndex( myIndex );
479+
}
480+
else
481+
{
482+
cboxTransparencyBand->setCurrentIndex( cboxTransparencyBand->findText( TRSTRING_NOT_SET ) );
483+
}
484484
}
485+
485486
//add current NoDataValue to NoDataValue line edit
486487
if ( mRasterLayer->isNoDataValueValid() )
487488
{
@@ -543,12 +544,12 @@ void QgsRasterLayerProperties::sync()
543544
pixmapThumbnail->setPixmap( myQPixmap );
544545

545546
//update the legend pixmap on this dialog
546-
pixmapLegend->setPixmap( mRasterLayer->legendAsPixmap() );
547+
//pixmapLegend->setPixmap( mRasterLayer->legendAsPixmap() );
547548
pixmapLegend->setScaledContents( true );
548549
pixmapLegend->repaint();
549550

550551
//set the palette pixmap
551-
pixmapPalette->setPixmap( mRasterLayer->paletteAsPixmap( mRasterLayer->bandNumber( mRasterLayer->grayBandName() ) ) );
552+
//pixmapPalette->setPixmap( mRasterLayer->paletteAsPixmap( mRasterLayer->bandNumber( mRasterLayer->grayBandName() ) ) );
552553
pixmapPalette->setScaledContents( true );
553554
pixmapPalette->repaint();
554555

@@ -1361,6 +1362,7 @@ void QgsRasterLayerProperties::on_pbnRemoveSelectedRow_clicked()
13611362

13621363
void QgsRasterLayerProperties::pixelSelected( const QgsPoint& canvasPoint )
13631364
{
1365+
#if 0 //needs to be fixed
13641366
//PixelSelectorTool has registered a mouse click on the canvas, so bring the dialog back to the front
13651367
raise();
13661368
setModal( true );
@@ -1395,7 +1397,7 @@ void QgsRasterLayerProperties::pixelSelected( const QgsPoint& canvasPoint )
13951397
}
13961398
}
13971399
}
1398-
1400+
#endif //0
13991401
}
14001402

14011403
void QgsRasterLayerProperties::sliderTransparency_valueChanged( int theValue )

0 commit comments

Comments
 (0)
Please sign in to comment.