21 #ifndef QGSRASTERLAYER_H
22 #define QGSRASTERLAYER_H
196 const QString &baseName = QString::null,
197 bool loadDefaultStyleFlag =
true );
206 const QString &baseName,
207 const QString &providerKey,
208 bool loadDefaultStyleFlag =
true );
237 static bool isValidRasterFileName(
const QString & theFileNameQString, QString &retError );
238 static bool isValidRasterFileName(
const QString & theFileNameQString );
241 static QDateTime lastModified(
const QString & name );
244 void setDataProvider(
const QString & provider );
269 int bandCount()
const;
272 const QString bandName(
int theBandNoInt );
283 virtual void reload()
override;
294 void draw( QPainter * theQPainter,
305 QPixmap paletteAsPixmap(
int theBandNumber = 1 );
308 QString providerType()
const;
311 double rasterUnitsPerPixelX();
312 double rasterUnitsPerPixelY();
325 int theSampleSize = SAMPLE_SIZE,
326 bool theGenerateLookupTableFlag =
true );
329 void setDefaultContrastEnhancement();
332 void setDrawingStyle(
const QString & theDrawingStyleQString );
335 void showProgress(
int theValue );
338 virtual QStringList
subLayers()
const override;
342 Q_DECL_DEPRECATED QPixmap previewAsPixmap( QSize
size, QColor bgColor = Qt::white );
346 QImage previewAsImage( QSize
size, QColor bgColor = Qt::white,
347 QImage::Format format = QImage::Format_ARGB32_Premultiplied );
355 virtual void setLayerOrder(
const QStringList &layers )
override;
363 virtual QDateTime
timestamp()
const override {
return mDataProvider->timestamp() ; }
366 void showStatusMessage(
const QString & theMessage );
369 Q_DECL_DEPRECATED
void updateProgress(
int,
int );
372 void onProgress(
int,
double, QString );
376 void progressUpdate(
int theValue );
385 bool readSymbology(
const QDomNode& node, QString& errorMessage )
override;
388 bool readXml(
const QDomNode& layer_node )
override;
391 bool writeSymbology( QDomNode&, QDomDocument& doc, QString& errorMessage )
const override;
394 bool writeXml( QDomNode & layer_node, QDomDocument & doc )
override;
401 void closeDataProvider();
410 const QString QSTRING_NOT_SET;
411 const QString TRSTRING_NOT_SET;
419 QDateTime mLastModified;
424 QString mProviderKey;
426 LayerType mRasterType;