QGIS API Documentation
3.34.0-Prizren (ffbdd678812)
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
22
#define SIP_NO_FILE
23
24
25
26
#include "qgis_core.h"
27
#include "
qgis.h
"
28
#include <QHash>
29
#include <QString>
30
31
class
QDomElement;
32
class
QgsRasterInterface
;
33
class
QgsRasterLayer
;
34
class
QgsRasterRenderer
;
35
class
QgsRasterRendererWidget
;
36
class
QgsRasterDataProvider
;
37
class
QgsRectangle
;
38
39
typedef
QgsRasterRenderer
*( *QgsRasterRendererCreateFunc )(
const
QDomElement &,
QgsRasterInterface
*input );
40
typedef
QgsRasterRendererWidget
*( *QgsRasterRendererWidgetCreateFunc )(
QgsRasterLayer
*,
const
QgsRectangle
&extent );
41
46
struct
CORE_EXPORT
QgsRasterRendererRegistryEntry
47
{
48
QgsRasterRendererRegistryEntry
(
const
QString &name,
const
QString &visibleName,
QgsRasterRendererCreateFunc
rendererFunction,
49
QgsRasterRendererWidgetCreateFunc
widgetFunction );
50
54
QgsRasterRendererRegistryEntry
() =
default
;
55
QString
name
;
56
QString
visibleName
;
//visible (and translatable) name
57
QIcon icon();
58
QgsRasterRendererCreateFunc
rendererCreateFunction = nullptr ;
//pointer to create function
59
QgsRasterRendererWidgetCreateFunc
widgetCreateFunction = nullptr ;
//pointer to create function for renderer widget
60
};
61
71
class
CORE_EXPORT
QgsRasterRendererRegistry
72
{
73
public
:
74
75
QgsRasterRendererRegistry
();
76
77
void
insert(
const
QgsRasterRendererRegistryEntry
&entry );
78
void
insertWidgetFunction(
const
QString &rendererName,
QgsRasterRendererWidgetCreateFunc
func );
79
bool
rendererData(
const
QString &rendererName,
QgsRasterRendererRegistryEntry
&data )
const
;
80
QStringList renderersList()
const
;
81
QList< QgsRasterRendererRegistryEntry > entries()
const
;
82
87
QgsRasterRenderer
*defaultRendererForDrawingStyle(
Qgis::RasterDrawingStyle
drawingStyle,
QgsRasterDataProvider
*provider )
const
;
88
89
private
:
90
QHash< QString, QgsRasterRendererRegistryEntry > mEntries;
91
QStringList mSortedEntries;
92
93
//read min/max values from
94
bool
minMaxValuesForBand(
int
band,
QgsRasterDataProvider
*provider,
double
&minValue,
double
&maxValue )
const
;
95
};
96
97
#endif
// QGSRASTERRENDERERREGISTRY_H
Qgis::RasterDrawingStyle
RasterDrawingStyle
Raster drawing styles.
Definition
qgis.h:3330
QgsRasterDataProvider
Base class for raster data providers.
Definition
qgsrasterdataprovider.h:90
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:72
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
QgsRasterRendererWidgetCreateFunc
QgsRasterRendererWidget *(* QgsRasterRendererWidgetCreateFunc)(QgsRasterLayer *, const QgsRectangle &extent)
Definition
qgsrasterrendererregistry.h:40
QgsRasterRendererCreateFunc
QgsRasterRenderer *(* QgsRasterRendererCreateFunc)(const QDomElement &, QgsRasterInterface *input)
Definition
qgsrasterrendererregistry.h:39
QgsRasterRendererRegistryEntry
Registry for raster renderer entries.
Definition
qgsrasterrendererregistry.h:47
QgsRasterRendererRegistryEntry::QgsRasterRendererRegistryEntry
QgsRasterRendererRegistryEntry()=default
Constructor for QgsRasterRendererRegistryEntry.
QgsRasterRendererRegistryEntry::name
QString name
Definition
qgsrasterrendererregistry.h:55
QgsRasterRendererRegistryEntry::visibleName
QString visibleName
Definition
qgsrasterrendererregistry.h:56
Generated on Mon Oct 30 2023 18:42:25 for QGIS API Documentation by
1.9.8