QGIS API Documentation
3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
src
core
raster
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
#define SIP_NO_FILE
20
21
#include "
qgsmaplayerrenderer.h
"
22
#include "
qgsmapclippingregion.h
"
23
24
class
QPainter;
25
26
class
QgsMapToPixel
;
27
class
QgsRasterLayer
;
28
class
QgsRasterPipe
;
29
struct
QgsRasterViewPort
;
30
class
QgsRenderContext
;
31
32
class
QgsRasterLayerRenderer
;
33
class
QgsRasterLayerLabelProvider
;
34
35
#include "
qgsrasterinterface.h
"
36
38
44
class
CORE_EXPORT QgsRasterLayerRendererFeedback :
public
QgsRasterBlockFeedback
45
{
46
Q_OBJECT
47
48
public
:
50
explicit
QgsRasterLayerRendererFeedback(
QgsRasterLayerRenderer
*r );
51
53
void
onNewData
()
override
;
54
private
:
55
QgsRasterLayerRenderer
*mR =
nullptr
;
56
int
mMinimalPreviewInterval;
57
QTime mLastPreview;
58
};
59
61
68
class
CORE_EXPORT
QgsRasterLayerRenderer
:
public
QgsMapLayerRenderer
69
{
70
public
:
71
QgsRasterLayerRenderer
(
QgsRasterLayer
*layer,
QgsRenderContext
&rendererContext );
72
~QgsRasterLayerRenderer
()
override
;
73
74
bool
render()
override
;
75
QgsFeedback
*feedback()
const override
;
76
bool
forceRasterRender()
const override
;
77
78
private
:
79
80
void
prepareLabeling(
QgsRasterLayer
*layer );
81
void
drawLabeling();
82
83
QString mLayerName;
84
QgsRasterViewPort
*mRasterViewPort =
nullptr
;
85
86
double
mLayerOpacity = 1.0;
87
std::unique_ptr<QgsRasterPipe> mPipe;
88
89
Qgis::RasterProviderCapabilities
mProviderCapabilities;
90
Qgis::RasterInterfaceCapabilities
mInterfaceCapabilities;
91
93
QgsRasterLayerRendererFeedback *mFeedback =
nullptr
;
94
95
QList< QgsMapClippingRegion > mClippingRegions;
96
97
double
mElevationScale = 1.0;
98
double
mElevationOffset = 0.0;
99
int
mElevationBand = 0;
100
bool
mDrawElevationMap =
false
;
101
102
bool
mEnableProfile =
false
;
103
quint64 mPreparationTime = 0;
104
105
// may be NULLPTR. no need to delete: if exists it is owned by labeling engine
106
QgsRasterLayerLabelProvider
*mLabelProvider =
nullptr
;
107
108
void
drawElevationMap();
109
110
friend
class
QgsRasterLayerRendererFeedback;
111
};
112
113
114
#endif
// QGSRASTERLAYERRENDERER_H
Qgis::RasterProviderCapabilities
QFlags< RasterProviderCapability > RasterProviderCapabilities
Raster data provider capabilities.
Definition
qgis.h:4633
Qgis::RasterInterfaceCapabilities
QFlags< RasterInterfaceCapability > RasterInterfaceCapabilities
Raster interface capabilities.
Definition
qgis.h:4600
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition
qgsfeedback.h:44
QgsMapLayerRenderer
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Definition
qgsmaplayerrenderer.h:52
QgsMapToPixel
Perform transforms between map coordinates and device coordinates.
Definition
qgsmaptopixel.h:37
QgsRasterBlockFeedback
Feedback object tailored for raster block reading.
Definition
qgsrasterinterface.h:42
QgsRasterBlockFeedback::onNewData
virtual void onNewData()
May be emitted by raster data provider to indicate that some partial data are available and a new pre...
Definition
qgsrasterinterface.h:53
QgsRasterLayerLabelProvider
Implements labeling support for raster layers.
Definition
qgsrasterlabeling.h:46
QgsRasterLayerRenderer
Implementation of threaded rendering for raster layers.
Definition
qgsrasterlayerrenderer.h:69
QgsRasterLayer
Represents a raster layer.
Definition
qgsrasterlayer.h:79
QgsRasterPipe
Contains a pipeline of raster interfaces for sequential raster processing.
Definition
qgsrasterpipe.h:50
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:62
qgsmapclippingregion.h
qgsmaplayerrenderer.h
qgsrasterinterface.h
QgsRasterViewPort
This class provides details of the viewable area that a raster will be rendered into.
Definition
qgsrasterviewport.h:35
Generated on Thu Dec 26 2024 02:19:01 for QGIS API Documentation by
1.9.8