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 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 akars[email protected][email protected][email protected][email protected]dema[email protected][email protected]t

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 49 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 100 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 113 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 122 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 55 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 210 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 251 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 111 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 335 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 346 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)

◆ setDrawLock()

void SkyMapDrawAbstract::setDrawLock ( bool  state)

Acquire / release a draw lock.

This prevents other drawing from happening

Definition at line 383 of file skymapdrawabstract.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Dec 8 2022 03:59:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.