Contact : ole.moller.nielsen@gmail.com
Note
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
A class for creating a map legend.
Add a class to the current legend. If the legend is not defined, a new one will be created. A legend is just an image file with nicely rendered classes in it.
Args:
theColour - Required colour for the class as a QColor
theMin - Optional minimum value for the class
- theMax - Optional maximum value for the class * theCategory - Optional category name (will be used in lieu of
min/max)
theLabel - Optional text label for the class
Add a class to the current legend. If the legend is not defined, a new one will be created. A legend is just an image file with nicely rendered classes in it.
Note
This method just extracts the colour from the symbol and then delegates to the addClassToLegend function.
Args:
theSymbol - Required symbol for the class as a QgsSymbol
theMin - Optional minimum value for the class
- theMax - Optional maximum value for the class * theCategory - Optional category name (will be used in lieu of
min/max)
theLabel - Optional text label for the class
Grow the legend pixmap enough to accommodate one more legend entry.
Examine the classes of the impact layer associated with this print job.
Get the legend for a raster layer as an image.
This module forms part of the InaSAFE tool.