21 #ifndef QGSRASTERLAYER_H
22 #define QGSRASTERLAYER_H
202 const QString & baseName = QString::null,
203 bool loadDefaultStyleFlag =
true );
207 const QString & baseName,
208 const QString & providerKey,
209 bool loadDefaultStyleFlag =
true );
238 static bool isValidRasterFileName(
const QString & theFileNameQString, QString &retError );
239 static bool isValidRasterFileName(
const QString & theFileNameQString );
242 static QDateTime lastModified(
const QString & name );
245 void setDataProvider(
const QString & provider );
270 int bandCount()
const;
273 const QString bandName(
int theBandNoInt );
295 void draw( QPainter * theQPainter,
306 QPixmap paletteAsPixmap(
int theBandNumber = 1 );
309 QString providerType()
const;
312 double rasterUnitsPerPixelX();
313 double rasterUnitsPerPixelY();
326 int theSampleSize = SAMPLE_SIZE,
327 bool theGenerateLookupTableFlag =
true );
330 void setDefaultContrastEnhancement();
333 void setDrawingStyle(
const QString & theDrawingStyleQString );
336 void showProgress(
int theValue );
343 Q_DECL_DEPRECATED QPixmap previewAsPixmap( QSize
size, QColor bgColor = Qt::white );
347 QImage previewAsImage( QSize
size, QColor bgColor = Qt::white,
348 QImage::Format format = QImage::Format_ARGB32_Premultiplied );
364 virtual QDateTime
timestamp()
const {
return mDataProvider->timestamp() ; }
367 void showStatusMessage(
const QString & theMessage );
370 Q_DECL_DEPRECATED
void updateProgress(
int,
int );
373 void onProgress(
int,
double, QString );
377 void progressUpdate(
int theValue );
386 bool readSymbology(
const QDomNode& node, QString& errorMessage );
389 bool readXml(
const QDomNode& layer_node );
392 bool writeSymbology( QDomNode&, QDomDocument& doc, QString& errorMessage )
const;
395 bool writeXml( QDomNode & layer_node, QDomDocument & doc );
402 void closeDataProvider();
411 const QString QSTRING_NOT_SET;
412 const QString TRSTRING_NOT_SET;
420 QDateTime mLastModified;
425 QString mProviderKey;
427 LayerType mRasterType;