kstars
#include <legend.h>
Public Types | |
enum | LEGEND_ORIENTATION { LO_HORIZONTAL, LO_VERTICAL } |
enum | LEGEND_POSITION { LP_UPPER_LEFT, LP_UPPER_RIGHT, LP_LOWER_LEFT, LP_LOWER_RIGHT, LP_FLOATING } |
enum | LEGEND_TYPE { LT_FULL, LT_SCALE_MAGNITUDES, LT_SCALE_ONLY, LT_MAGNITUDES_ONLY, LT_SYMBOLS_ONLY } |
Detailed Description
Legend class is used for painting legends on class inheriting QPaintDevice.
Its methods enable changing settings of legend such as legend type (scale only/full legend), symbol size, sizes for symbol description's bounding rectangles, symbol spacing etc. Typical use of this class would be to create instance of Legend class, set all properties using appropriate methods and paint it by calling paintLegend() method, passing QPaintDevice or QPainter subclass (useful eg. with QSvgGenerator class, which can't be painted by two QPainter classes).
Member Enumeration Documentation
enum Legend::LEGEND_TYPE |
Constructor & Destructor Documentation
|
explicit |
Constructor.
Definition at line 38 of file legend.cpp.
|
explicit |
copy constructor
- Note
- This class needs to be explicitly copied because of the m_Painter pointer
Definition at line 578 of file legend.cpp.
Legend::~Legend | ( | ) |
Destructor.
Definition at line 48 of file legend.cpp.
Member Function Documentation
QSize Legend::calculateSize | ( | ) |
Calculates size of legend that will be painted using current settings.
- Returns
- Size of legend.
Definition at line 56 of file legend.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Legend::paintLegend | ( | QPaintDevice * | pd | ) |
Paint legend on passed QPaintDevice at selected position.
- Parameters
-
pd QPaintDevice on which legend will be painted.
Definition at line 162 of file legend.cpp.
void Legend::paintLegend | ( | SkyQPainter * | painter | ) |
Paint legend using passed SkyQPainter.
This method is used to enable painting on QPaintDevice subclasses that can't be painted by multiple QPainter subclasses (e.g. QSvgGenerator).
- Parameters
-
painter that will be used to paint legend.
- Note
- Passed SkyQPainter should be already set up to paint at specific QPaintDevice subclass and should be initialized by its begin() method. After legend is painted, SkyQPainter instance will not be finished, so it's necessary to call end() method manually.
Definition at line 178 of file legend.cpp.
void Legend::paintLegend | ( | QPaintDevice * | pd, |
LEGEND_TYPE | type, | ||
LEGEND_POSITION | pos | ||
) |
Paint legend on passed QPaintDevice at selected position.
- Parameters
-
pd QPaintDevice on which legend will be painted. pos LEGEND_POSITION enum value. scaleOnly should legend be painted scale-only?
Definition at line 311 of file legend.cpp.
void Legend::paintLegend | ( | SkyQPainter * | painter, |
LEGEND_TYPE | type, | ||
LEGEND_POSITION | pos | ||
) |
Paint legend using passed SkyQPainter.
This method is used to enable painting on QPaintDevice subclasses that can't be painted by multiple QPainter subclasses (eg. QSvgGenerator).
- Parameters
-
painter that will be used to paint legend. pos LEGEND_POSITION enum value. scaleOnly should legend be painted scale-only?
- Note
- Passed SkyQPainter should be already set up to paint at specific QPaintDevice subclass and should be initialized by its begin() method. After legend is painted, SkyQPainter instance will not be finished, so it's necessary to call end() method manually.
Definition at line 325 of file legend.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.