Search for usage in LXR

#include <skymapdrawabstract.h>

Inheritance diagram for SkyMapDrawAbstract:

Public Member Functions

 SkyMapDrawAbstract (SkyMap *sm)
void drawAngleRuler (QPainter &psky)
void drawObjectLabels (QList< SkyObject * > &labelObjects)
void drawOrientationArrows (QPainter &p)
void drawOverlays (QPainter &p, bool drawFov=true)
void drawSolverFOV (QPainter &psky)
void drawTelescopeSymbols (QPainter &psky)
void drawZoomBox (QPainter &psky)
void exportSkyImage (QPaintDevice *pd, bool scale=false)
void exportSkyImage (SkyQPainter *painter, bool scale=false)

Static Public Member Functions

static bool drawLock ()
static void setDrawLock (bool state)

Protected Member Functions

virtual ~SkyMapDrawAbstract ()=default
virtual void paintEvent (QPaintEvent *e)=0

Protected Attributes


Static Protected Attributes

static bool m_DrawLock = false

Detailed Description

This class defines the methods that both rendering engines (GLPainter and QPainter) must implement.

This also allows us to add more rendering engines if required.

Akarsh Simha

Definition at line 29 of file skymapdrawabstract.h.

Constructor & Destructor Documentation

◆ ~SkyMapDrawAbstract()

virtual SkyMapDrawAbstract::~SkyMapDrawAbstract ( )

Virtual Destructor.

◆ SkyMapDrawAbstract()

SkyMapDrawAbstract::SkyMapDrawAbstract ( SkyMap * sm)

Constructor that sets data and m_SkyMap, and initializes the FPS counters.

Definition at line 50 of file skymapdrawabstract.cpp.

Member Function Documentation

◆ drawAngleRuler()

void SkyMapDrawAbstract::drawAngleRuler ( QPainter & psky)

Draw a dashed line from the Angular-Ruler start point to the current mouse cursor, when in Angular-Ruler mode.

pskyreference to the QPainter on which to draw (this should be the Sky pixmap).

Definition at line 106 of file skymapdrawabstract.cpp.

◆ drawLock()

static bool SkyMapDrawAbstract::drawLock ( )
true if a draw is in progress or is locked, false otherwise. This is just the value of m_DrawLock

Definition at line 119 of file skymapdrawabstract.h.

◆ drawObjectLabels()

void SkyMapDrawAbstract::drawObjectLabels ( QList< SkyObject * > & labelObjects)

Draw "user labels".

User labels are name labels attached to objects manually with the right-click popup menu. Also adds a label to the FocusObject if the Option UseAutoLabel is true.

labelObjectsQList of pointers to the objects which need labels (excluding the centered object)
the labelObjects list is managed by the SkyMapComponents class

Definition at line 205 of file skymapdrawabstract.cpp.

◆ drawOrientationArrows()

void SkyMapDrawAbstract::drawOrientationArrows ( QPainter & p)

Draw north and zenith arrows to show the orientation while rotating the sky map.

preference to the QPainter on which to draw (this should be the sky map)

Definition at line 117 of file skymapdrawabstract.cpp.

◆ drawOverlays()

void SkyMapDrawAbstract::drawOverlays ( QPainter & p,
bool drawFov = true )

Draw the overlays on top of the sky map.

These include the infoboxes, field-of-view indicator, telescope symbols, zoom box and any other user-interaction graphics.

The overlays can be updated rapidly, without having to recompute the entire SkyMap. The stored Sky image is simply blitted onto the SkyMap widget, and then we call drawOverlays() to refresh the overlays.

ppointer to the Sky pixmap
drawFovdetermines if the FOV should be drawn

Definition at line 56 of file skymapdrawabstract.cpp.

◆ drawSolverFOV()

void SkyMapDrawAbstract::drawSolverFOV ( QPainter & psky)

Draw FOV of solved image in Ekos Alignment Module.

pskyreference to the QPainter on which to draw (this should be the Sky pixmap).

Definition at line 293 of file skymapdrawabstract.cpp.

◆ drawTelescopeSymbols()

void SkyMapDrawAbstract::drawTelescopeSymbols ( QPainter & psky)

Draw symbols at the position of each Telescope currently being controlled by KStars.

The shape of the Telescope symbol is currently a hard-coded bullseye.
pskyreference to the QPainter on which to draw (this should be the Sky pixmap).

Definition at line 334 of file skymapdrawabstract.cpp.

◆ drawZoomBox()

void SkyMapDrawAbstract::drawZoomBox ( QPainter & psky)

Draw a dotted-line rectangle which traces the potential new field-of-view in ZoomBox mode.

pskyreference to the QPainter on which to draw (this should be the Sky pixmap).

Definition at line 194 of file skymapdrawabstract.cpp.

◆ exportSkyImage() [1/2]

void SkyMapDrawAbstract::exportSkyImage ( QPaintDevice * pd,
bool scale = false )

Draw the current Sky map to a pixmap which is to be printed or exported to a file.

 @param pd pointer to the QPaintDevice on which to draw.
 @param scale defines if the Sky map should be scaled.
 @see KStars::slotExportImage()
 @see KStars::slotPrint()

Definition at line 418 of file skymapdrawabstract.cpp.

◆ exportSkyImage() [2/2]

void SkyMapDrawAbstract::exportSkyImage ( SkyQPainter * painter,
bool scale = false )

Draw the current Sky map using passed SkyQPainter instance.

Required when used QPaintDevice doesn't support drawing using multiple painters (e.g. QSvgGenerator which generates broken SVG output when more than one QPainter subclass is used). Passed painter should already be initialized to draw on selected QPaintDevice subclass using begin() and it won't be ended [end()] by this method.

painterpointer to the SkyQPainter already set up to paint on selected QPaintDevice subclass.
scaleshould sky image be scaled to fit used QPaintDevice?

Definition at line 429 of file skymapdrawabstract.cpp.

◆ paintEvent()

virtual void SkyMapDrawAbstract::paintEvent ( QPaintEvent * e)
protectedpure virtual

Overridden paintEvent method.

Must be implemented by subclasses to draw the SkyMap. (This method is pure virtual)

Implemented in SkyMapGLDraw.

◆ setDrawLock()

void SkyMapDrawAbstract::setDrawLock ( bool state)

Acquire / release a draw lock.

This prevents other drawing from happening

Definition at line 466 of file skymapdrawabstract.cpp.

Member Data Documentation

◆ m_DrawLock

bool SkyMapDrawAbstract::m_DrawLock = false

Definition at line 150 of file skymapdrawabstract.h.

◆ m_KStarsData

KStarsData* SkyMapDrawAbstract::m_KStarsData

Definition at line 148 of file skymapdrawabstract.h.

◆ m_SkyMap

SkyMap* SkyMapDrawAbstract::m_SkyMap

Definition at line 149 of file skymapdrawabstract.h.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.