QGIS API Documentation
3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
src
core
raster
qgsrasterrendererregistry.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterrendererregistry.h
3
---------------------------
4
begin : January 2012
5
copyright : (C) 2012 by Marco Hugentobler
6
email : marco at sourcepole dot ch
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSRASTERRENDERERREGISTRY_H
19
#define QGSRASTERRENDERERREGISTRY_H
20
21
#include "qgis_core.h"
22
#include "
qgis.h
"
23
#include <QHash>
24
#include <QString>
25
26
class
QDomElement;
27
class
QgsRasterInterface
;
28
class
QgsRasterLayer
;
29
class
QgsRasterRenderer
;
30
class
QgsRasterRendererWidget
;
31
class
QgsRasterDataProvider
;
32
class
QgsRectangle
;
33
34
#ifndef SIP_RUN
35
typedef
QgsRasterRenderer
*( *QgsRasterRendererCreateFunc )(
const
QDomElement &,
QgsRasterInterface
*input );
36
typedef
QgsRasterRendererWidget
*( *QgsRasterRendererWidgetCreateFunc )(
QgsRasterLayer
*,
const
QgsRectangle
&extent );
37
44
struct
CORE_EXPORT
QgsRasterRendererRegistryEntry
45
{
46
52
QgsRasterRendererRegistryEntry
(
const
QString &name,
const
QString &visibleName,
QgsRasterRendererCreateFunc
rendererFunction,
53
QgsRasterRendererWidgetCreateFunc
widgetFunction,
Qgis::RasterRendererCapabilities
capabilities =
Qgis::RasterRendererCapabilities
() );
54
55
QgsRasterRendererRegistryEntry
() =
default
;
56
QString
name
;
57
QString
visibleName
;
//visible (and translatable) name
58
64
Qgis::RasterRendererCapabilities
capabilities
;
65
66
QIcon icon();
67
QgsRasterRendererCreateFunc
rendererCreateFunction = nullptr ;
//pointer to create function
68
QgsRasterRendererWidgetCreateFunc
widgetCreateFunction = nullptr ;
//pointer to create function for renderer widget
69
};
70
71
#endif
72
82
class
CORE_EXPORT
QgsRasterRendererRegistry
83
{
84
public
:
85
94
QgsRasterRendererRegistry
();
95
101
void
insert(
const
QgsRasterRendererRegistryEntry
&entry )
SIP_SKIP
;
102
108
void
insertWidgetFunction(
const
QString &rendererName,
QgsRasterRendererWidgetCreateFunc
func )
SIP_SKIP
;
109
115
bool
rendererData(
const
QString &rendererName,
QgsRasterRendererRegistryEntry
&data )
const
SIP_SKIP
;
116
120
QStringList renderersList()
const
;
121
127
QList< QgsRasterRendererRegistryEntry > entries()
const
SIP_SKIP
;
128
134
Qgis::RasterRendererCapabilities
rendererCapabilities(
const
QString &rendererName )
const
;
135
140
QgsRasterRenderer
*defaultRendererForDrawingStyle(
Qgis::RasterDrawingStyle
drawingStyle,
QgsRasterDataProvider
*provider )
const
SIP_FACTORY
;
141
142
private
:
143
QHash< QString, QgsRasterRendererRegistryEntry > mEntries;
144
QStringList mSortedEntries;
145
146
//read min/max values from
147
bool
minMaxValuesForBand(
int
band,
QgsRasterDataProvider
*provider,
double
&minValue,
double
&maxValue )
const
;
148
};
149
150
#endif
// QGSRASTERRENDERERREGISTRY_H
Qgis::RasterDrawingStyle
RasterDrawingStyle
Raster drawing styles.
Definition
qgis.h:4435
Qgis::RasterRendererCapabilities
QFlags< RasterRendererCapability > RasterRendererCapabilities
Raster renderer capabilities.
Definition
qgis.h:1425
QgsRasterDataProvider
Base class for raster data providers.
Definition
qgsrasterdataprovider.h:89
QgsRasterInterface
Base class for processing filters like renderers, reprojector, resampler etc.
Definition
qgsrasterinterface.h:136
QgsRasterLayer
Represents a raster layer.
Definition
qgsrasterlayer.h:78
QgsRasterRendererRegistry
Registry for raster renderers.
Definition
qgsrasterrendererregistry.h:83
QgsRasterRendererWidget
Abstract base class for widgets which configure a QgsRasterRenderer.
Definition
qgsrasterrendererwidget.h:40
QgsRasterRenderer
Raster renderer pipe that applies colors to a raster.
Definition
qgsrasterrenderer.h:41
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:42
qgis.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:126
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
QgsRasterRendererWidgetCreateFunc
QgsRasterRendererWidget *(* QgsRasterRendererWidgetCreateFunc)(QgsRasterLayer *, const QgsRectangle &extent)
Definition
qgsrasterrendererregistry.h:36
QgsRasterRendererCreateFunc
QgsRasterRenderer *(* QgsRasterRendererCreateFunc)(const QDomElement &, QgsRasterInterface *input)
Definition
qgsrasterrendererregistry.h:35
QgsRasterRendererRegistryEntry
Registry for raster renderer entries.
Definition
qgsrasterrendererregistry.h:45
QgsRasterRendererRegistryEntry::QgsRasterRendererRegistryEntry
QgsRasterRendererRegistryEntry()=default
QgsRasterRendererRegistryEntry::name
QString name
Definition
qgsrasterrendererregistry.h:56
QgsRasterRendererRegistryEntry::capabilities
Qgis::RasterRendererCapabilities capabilities
Renderer capabilities.
Definition
qgsrasterrendererregistry.h:64
QgsRasterRendererRegistryEntry::visibleName
QString visibleName
Definition
qgsrasterrendererregistry.h:57
Generated on Sun Nov 10 2024 14:15:43 for QGIS API Documentation by
1.9.8