kstars
#include <skyqpainter.h>

Public Member Functions | |
SkyQPainter (QPaintDevice *pd, const QSize &canvasSize) | |
SkyQPainter (QPaintDevice *pd) | |
SkyQPainter (QWidget *widget, QPaintDevice *pd=0) | |
virtual | ~SkyQPainter () |
virtual void | begin () |
virtual bool | drawDeepSkyObject (DeepSkyObject *obj, bool drawImage=false) |
virtual void | drawDeepSkySymbol (const QPointF &pos, int type, float size, float e, float positionAngle) |
virtual void | drawFlags () |
virtual void | drawHorizon (bool filled, SkyPoint *labelPoint=0, bool *drawLabel=0) |
virtual void | drawObservingList (const QList< SkyObject * > &obs) |
virtual bool | drawPlanet (KSPlanetBase *planet) |
virtual bool | drawPointSource (SkyPoint *loc, float mag, char sp= 'A') |
virtual void | drawPointSource (const QPointF &pos, float size, char sp= 'A') |
virtual void | drawSatellite (Satellite *sat) |
virtual void | drawSkyBackground () |
virtual void | drawSkyLine (SkyPoint *a, SkyPoint *b) |
virtual void | drawSkyPolygon (LineList *list) |
virtual void | drawSkyPolyline (LineList *list, SkipList *skipList=0, LineListLabel *label=0) |
virtual bool | drawSupernova (Supernova *sup) |
virtual void | end () |
bool | getVectorStars () const |
virtual void | setBrush (const QBrush &brush) |
virtual void | setPen (const QPen &pen) |
void | setVectorStars (bool vectorStars) |
![]() | |
SkyPainter () | |
virtual | ~SkyPainter () |
void | setSizeMagLimit (float sizeMagLim) |
float | starWidth (float mag) const |
Static Public Member Functions | |
static void | initStarImages () |
Additional Inherited Members | |
![]() | |
SkyMap * | m_sm |
Detailed Description
The QPainter-based painting backend.
This class implements the SkyPainter interface using a QPainter. For documentation,
- See also
- SkyPainter.
Definition at line 32 of file skyqpainter.h.
Constructor & Destructor Documentation
SkyQPainter::SkyQPainter | ( | QPaintDevice * | pd, |
const QSize & | canvasSize | ||
) |
Creates a SkyQPainter with the given QPaintDevice and uses the dimensions of the paint device as canvas dimensions.
- Parameters
-
pd the painting device. Cannot be 0 canvasSize the size of the canvas
Definition at line 87 of file skyqpainter.cpp.
SkyQPainter::SkyQPainter | ( | QPaintDevice * | pd | ) |
Creates a SkyQPainter with the given QPaintDevice and given canvas size.
- Parameters
-
pd the painting device. Cannot be 0
Definition at line 78 of file skyqpainter.cpp.
|
explicit |
Creates a SkyQPainter given a QWidget and an optional QPaintDevice.
- Parameters
-
widget the QWidget that provides the canvas size, and also the paint device unless pd
is specifiedpd the painting device. If 0, then widget
will be used.
Definition at line 96 of file skyqpainter.cpp.
|
virtual |
Definition at line 106 of file skyqpainter.cpp.
Member Function Documentation
|
virtual |
Begin painting.
- Note
- this function must be called before painting anything.
- See also
- end()
Implements SkyPainter.
Definition at line 110 of file skyqpainter.cpp.
|
virtual |
Draw a deep sky object.
- Parameters
-
obj the object to draw drawImage if true, try to draw the image of the object
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 424 of file skyqpainter.cpp.
|
virtual |
Definition at line 468 of file skyqpainter.cpp.
|
virtual |
|
virtual |
Implements SkyPainter.
Definition at line 750 of file skyqpainter.cpp.
Draw the symbols for the observing list.
- Parameters
-
obs the oberving list
Implements SkyPainter.
Definition at line 703 of file skyqpainter.cpp.
|
virtual |
Draw a planet.
- Parameters
-
planet the planet to draw
- Returns
- true if it was drawn
Implements SkyPainter.
Definition at line 320 of file skyqpainter.cpp.
|
virtual |
Draw a point source (e.g., a star).
- Parameters
-
loc the location of the source in the sky mag the magnitude of the source sp the spectral class of the source
- Returns
- true if a source was drawn
Implements SkyPainter.
Definition at line 371 of file skyqpainter.cpp.
|
virtual |
This function exists so that we can draw other objects (e.g., planets) as point sources.
Definition at line 386 of file skyqpainter.cpp.
|
virtual |
|
virtual |
Draw a line between points in the sky.
- Parameters
-
a the first point b the second point
- Note
- this function will skip lines not on screen and clip lines that are only partially visible.
Implements SkyPainter.
Definition at line 231 of file skyqpainter.cpp.
|
virtual |
Draw a polygon in the sky.
- Parameters
-
list a list of points in the sky
- See also
- drawSkyPolyline()
Implements SkyPainter.
Definition at line 282 of file skyqpainter.cpp.
|
virtual |
Draw a polyline in the sky.
- Parameters
-
list a list of points in the sky skipList a SkipList object used to control skipping line segments label a pointer to the label for this line
- Note
- it's more efficient to use this than repeated calls to drawSkyLine(), because it avoids an extra points->size() -2 projections.
Implements SkyPainter.
Definition at line 249 of file skyqpainter.cpp.
|
virtual |
|
virtual |
End and finalize painting.
- Note
- this function must be called after painting anything.
- it is not guaranteed that anything will actually be drawn until end() is called.
- See also
- begin();
Implements SkyPainter.
Definition at line 119 of file skyqpainter.cpp.
|
inline |
Definition at line 65 of file skyqpainter.h.
|
static |
Recalculates the star pixmaps.
Definition at line 140 of file skyqpainter.cpp.
|
virtual |
Set the brush of the painter.
Implements SkyPainter.
Definition at line 135 of file skyqpainter.cpp.
|
virtual |
|
inline |
- Parameters
-
vectorStars Draw stars as vector graphics whenever possible.
- Note
- Drawing stars as vectors is slower, but is better when saving .svg files. Set to true only when you are drawing on a canvas where speed doesn't matter. Definitely not when drawing on the SkyMap.
Definition at line 64 of file skyqpainter.h.
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:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.