• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | Protected Attributes | List of all members
SkyPainter Class Referenceabstract

#include <skypainter.h>

Inheritance diagram for SkyPainter:
Inheritance graph
[legend]

Public Member Functions

 SkyPainter ()
 
virtual ~SkyPainter ()
 
virtual void begin ()=0
 
virtual bool drawDeepSkyObject (DeepSkyObject *obj, bool drawImage=false)=0
 
virtual void drawFlags ()=0
 
virtual void drawHorizon (bool filled, SkyPoint *labelPoint=0, bool *drawLabel=0)=0
 
virtual void drawObservingList (const QList< SkyObject * > &obs)=0
 
virtual bool drawPlanet (KSPlanetBase *planet)=0
 
virtual bool drawPointSource (SkyPoint *loc, float mag, char sp= 'A')=0
 
virtual void drawSatellite (Satellite *sat)=0
 
virtual void drawSkyBackground ()=0
 
virtual void drawSkyLine (SkyPoint *a, SkyPoint *b)=0
 
virtual void drawSkyPolygon (LineList *list)=0
 
virtual void drawSkyPolyline (LineList *list, SkipList *skipList=0, LineListLabel *label=0)=0
 
virtual bool drawSupernova (Supernova *sup)=0
 
virtual void end ()=0
 
virtual void setBrush (const QBrush &brush)=0
 
virtual void setPen (const QPen &pen)=0
 
void setSizeMagLimit (float sizeMagLim)
 
float starWidth (float mag) const
 

Protected Attributes

SkyMap * m_sm
 

Detailed Description

Draws things on the sky, without regard to backend.

This class serves as an interface to draw objects onto the sky without worrying about whether we are using a QPainter or OpenGL.

Definition at line 47 of file skypainter.h.

Constructor & Destructor Documentation

SkyPainter::SkyPainter ( )

Constructor.

Definition at line 34 of file skypainter.cpp.

SkyPainter::~SkyPainter ( )
virtual

Destructor.

Definition at line 40 of file skypainter.cpp.

Member Function Documentation

virtual void SkyPainter::begin ( )
pure virtual

Begin painting.

Note
this function must be called before painting anything.
See also
end()

Implemented in SkyQPainter, and SkyGLPainter.

virtual bool SkyPainter::drawDeepSkyObject ( DeepSkyObject *  obj,
bool  drawImage = false 
)
pure virtual

Draw a deep sky object.

Parameters
objthe object to draw
drawImageif true, try to draw the image of the object
Returns
true if it was drawn

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawFlags ( )
pure virtual

Draw flags.

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawHorizon ( bool  filled,
SkyPoint *  labelPoint = 0,
bool *  drawLabel = 0 
)
pure virtual

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawObservingList ( const QList< SkyObject * > &  obs)
pure virtual

Draw the symbols for the observing list.

Parameters
obsthe oberving list

Implemented in SkyQPainter, and SkyGLPainter.

virtual bool SkyPainter::drawPlanet ( KSPlanetBase *  planet)
pure virtual

Draw a planet.

Parameters
planetthe planet to draw
Returns
true if it was drawn

Implemented in SkyQPainter, and SkyGLPainter.

virtual bool SkyPainter::drawPointSource ( SkyPoint *  loc,
float  mag,
char  sp = 'A' 
)
pure virtual

Draw a point source (e.g., a star).

Parameters
locthe location of the source in the sky
magthe magnitude of the source
spthe spectral class of the source
Returns
true if a source was drawn

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawSatellite ( Satellite *  sat)
pure virtual

Draw a satellite.

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawSkyBackground ( )
pure virtual

Draw the sky background.

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawSkyLine ( SkyPoint *  a,
SkyPoint *  b 
)
pure virtual

Draw a line between points in the sky.

Parameters
athe first point
bthe second point
Note
this function will skip lines not on screen and clip lines that are only partially visible.

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawSkyPolygon ( LineList *  list)
pure virtual

Draw a polygon in the sky.

Parameters
lista list of points in the sky
See also
drawSkyPolyline()

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::drawSkyPolyline ( LineList *  list,
SkipList *  skipList = 0,
LineListLabel *  label = 0 
)
pure virtual

Draw a polyline in the sky.

Parameters
lista list of points in the sky
skipLista SkipList object used to control skipping line segments
labela 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.

Implemented in SkyQPainter, and SkyGLPainter.

virtual bool SkyPainter::drawSupernova ( Supernova *  sup)
pure virtual

Draw a Supernova.

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::end ( )
pure 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();

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::setBrush ( const QBrush &  brush)
pure virtual

Set the brush of the painter.

Implemented in SkyQPainter, and SkyGLPainter.

virtual void SkyPainter::setPen ( const QPen &  pen)
pure virtual

Set the pen of the painter.

Implemented in SkyQPainter, and SkyGLPainter.

void SkyPainter::setSizeMagLimit ( float  sizeMagLim)

Definition at line 45 of file skypainter.cpp.

float SkyPainter::starWidth ( float  mag) const

Get the width of a star of magnitude mag.

Definition at line 50 of file skypainter.cpp.

Member Data Documentation

SkyMap* SkyPainter::m_sm
protected

Definition at line 158 of file skypainter.h.


The documentation for this class was generated from the following files:
  • skypainter.h
  • skypainter.cpp
This file is part of the KDE documentation.
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.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal