QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsrasterlayerrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterlayerrenderer.h
3  --------------------------------------
4  Date : December 2013
5  Copyright : (C) 2013 by Martin Dobias
6  Email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSRASTERLAYERRENDERER_H
17 #define QGSRASTERLAYERRENDERER_H
18 
19 #include "qgsmaplayerrenderer.h"
20 
21 class QPainter;
22 
23 class QgsMapToPixel;
25 class QgsRasterLayer;
26 class QgsRasterPipe;
27 struct QgsRasterViewPort;
28 class QgsRenderContext;
29 
31 
32 #include "qgsrasterinterface.h"
33 
34 
42 {
43  public:
44  QgsRasterLayerRenderer( QgsRasterLayer* layer, QgsRenderContext& rendererContext );
46 
47  virtual bool render() override;
48 
49  virtual QgsFeedback* feedback() const override;
50 
51  protected:
52 
56 
59 
66  {
67  public:
69  explicit Feedback( QgsRasterLayerRenderer* r );
70 
72  virtual void onNewData() override;
73  private:
75  int mMinimalPreviewInterval;
76  QTime mLastPreview;
77  };
78 
81 };
82 
83 
84 #endif // QGSRASTERLAYERRENDERER_H
virtual QgsFeedback * feedback() const override
Access to feedback object of the layer renderer (may be null)
Base class for processing modules.
Definition: qgsrasterpipe.h:42
Specific internal feedback class to provide preview of raster layer rendering.
Feedback(QgsRasterLayerRenderer *r)
Create feedback object based on our layer renderer.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
const QgsMapToPixel * mMapToPixel
Implementation of threaded rendering for raster layers.
virtual bool render() override
Do the rendering (based on data stored in the class)
Base class for feedback objects to be used for cancellation of something running in a worker thread...
Definition: qgsfeedback.h:40
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:34
QgsRasterLayerRenderer(QgsRasterLayer *layer, QgsRenderContext &rendererContext)
Feedback * mFeedback
feedback class for cancellation and preview generation
QgsRasterViewPort * mRasterViewPort
Contains information about the context of a rendering operation.
virtual void onNewData() override
when notified of new data in data provider it launches a preview draw of the raster ...
Base class for utility classes that encapsulate information necessary for rendering of map layers...
This class provides details of the viewable area that a raster will be rendered into.
Feedback object tailored for raster block reading.