Kstars

skymapdrawabstract.cpp
1/*
2 SPDX-FileCopyrightText: 2001 Jason Harris <jharris@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7// This file implements the class SkyMapDrawAbstract, and is almost
8// identical to the older skymapdraw.cpp file, written by Jason
9// Harris. Essentially, skymapdraw.cpp was renamed and modified.
10// -- asimha (2011)
11
12#include <QPainter>
13#include <QPixmap>
14#include <QPainterPath>
15
16#include "skymapdrawabstract.h"
17#include "skymap.h"
18#include "Options.h"
19#include "fov.h"
20#include "kstars.h"
21#include "kstarsdata.h"
22#include "ksnumbers.h"
23#include "ksutils.h"
24#include "skyobjects/skyobject.h"
25#include "skyobjects/catalogobject.h"
26#include "catalogsdb.h"
27#include "skyobjects/starobject.h"
28#include "skyobjects/ksplanetbase.h"
29#include "simclock.h"
30#include "observinglist.h"
31#include "skycomponents/constellationboundarylines.h"
32#include "skycomponents/skylabeler.h"
33#include "skycomponents/skymapcomposite.h"
34#include "skyqpainter.h"
35#include "projections/projector.h"
36#include "projections/lambertprojector.h"
37
38#include <config-kstars.h>
39
40#ifdef HAVE_INDI
41#include <basedevice.h>
42#include "indi/indilistener.h"
43#include "indi/driverinfo.h"
44#include "indi/indistd.h"
45#include "indi/indimount.h"
46#include "indi/indidome.h"
47#endif
48
49bool SkyMapDrawAbstract::m_DrawLock = false;
50
51SkyMapDrawAbstract::SkyMapDrawAbstract(SkyMap *sm) : m_KStarsData(KStarsData::Instance()), m_SkyMap(sm)
52{
53 //m_fpstime.start();
54 //m_framecount = 0;
55}
56
58{
59 if (!KStars::Instance())
60 return;
61
62 //draw labels
63 SkyLabeler::Instance()->draw(p);
64
65 if (drawFov)
66 {
67 //draw FOV symbol
68 foreach (FOV *fov, m_KStarsData->getVisibleFOVs())
69 {
70 if (fov->lockCelestialPole())
71 {
72 SkyPoint centerSkyPoint = SkyMap::Instance()->projector()->fromScreen(p.viewport().center(), KStarsData::Instance());
73 QPointF screenSkyPoint = p.viewport().center();
74 double northRotation = SkyMap::Instance()->projector()->findNorthPA(&centerSkyPoint, screenSkyPoint.x(),
75 screenSkyPoint.y());
76 fov->setCenter(centerSkyPoint);
77 fov->setNorthPA(northRotation);
78 }
79 fov->draw(p, Options::zoomFactor());
80 }
81 }
82
84
86
88
89 drawZoomBox(p);
90
91 if (m_SkyMap->rotationStart.x() > 0 && m_SkyMap->rotationStart.y() > 0)
92 {
94 }
95
96 // FIXME: Maybe we should take care of this differently. Maybe
97 // drawOverlays should remain in SkyMap, since it just calls
98 // certain drawing functions which are implemented in
99 // SkyMapDrawAbstract. Really, it doesn't draw anything on its
100 // own.
101 if (m_SkyMap->rulerMode)
102 {
103 m_SkyMap->updateAngleRuler();
105 }
106}
107
109{
110#ifdef HAVE_INDI
111 if (INDIListener::Instance()->size() == 0)
112 return;
113
114 QColor domeColor = m_KStarsData->colorScheme()->colorNamed("DomeColor");
115 domeColor.setAlpha(64);
116 psky.setPen(Qt::NoPen);
117 psky.setBrush(domeColor);
118
119 for (auto &oneDevice : INDIListener::devices())
120 {
121 if (!(oneDevice->getDriverInterface() & INDI::BaseDevice::DOME_INTERFACE) || oneDevice->isConnected() == false)
122 continue;
123
124 auto dome = oneDevice->getDome();
125 if (!dome)
126 continue;
127
128 // Get dome measurements and position
129 double shutterWidth = dome->getShutterWidth();
130 double azimuth = dome->position();
131
132 if (shutterWidth <= 0)
133 continue;
134
135 // Calculate angular width in degrees
136 double radius = dome->getDomeRadius();
137 if (radius <= 0)
138 continue;
139
140 // Calculate circumference
141 double circumference = 2 * M_PI * radius;
142 // Convert shutter width to degrees
143 double angularWidth = (shutterWidth / circumference) * 360.0;
144 double halfWidth = angularWidth / 2.0;
145
146 // Create path for the slit
147 QPainterPath path;
148 // Points along each edge
149 const int steps = 50;
150 // Extra points for smooth top curve
151 const int topSteps = 20;
152
153 // Create points along left edge from horizon to 90 degrees
154 bool started = false;
155 for (int i = 0; i <= steps; i++)
156 {
157 double alt = (90.0 * i) / steps;
158
159 SkyPoint point;
160 point.setAz(dms(azimuth - halfWidth));
161 point.setAlt(dms(alt));
163
164 bool visible;
165 QPointF screen = m_SkyMap->m_proj->toScreen(&point, true, &visible);
166 if (visible)
167 {
168 if (!started)
169 {
170 path.moveTo(screen);
171 started = true;
172 }
173 else
174 {
175 path.lineTo(screen);
176 }
177 }
178 }
179
180 // Create smooth curve at the top
181 for (int i = 0; i <= topSteps; i++)
182 {
183 double fraction = double(i) / topSteps;
184 double az = azimuth - halfWidth + angularWidth * fraction;
185
186 SkyPoint point;
187 point.setAz(dms(az));
188 point.setAlt(dms(90.0));
190
191 bool visible;
192 QPointF screen = m_SkyMap->m_proj->toScreen(&point, true, &visible);
193 if (visible)
194 path.lineTo(screen);
195 }
196
197 // Create points along right edge from 90 degrees back to horizon
198 for (int i = steps; i >= 0; i--)
199 {
200 double alt = (90.0 * i) / steps;
201
202 SkyPoint point;
203 point.setAz(dms(azimuth + halfWidth));
204 point.setAlt(dms(alt));
206
207 bool visible;
208 QPointF screen = m_SkyMap->m_proj->toScreen(&point, true, &visible);
209 if (visible)
210 path.lineTo(screen);
211 }
212
213 // Close the path
214 path.closeSubpath();
215
216 // Draw the filled slit
217 psky.fillPath(path, domeColor);
218 }
219#endif
220}
221
223{
224 //FIXME use sky painter.
225 p.setPen(QPen(m_KStarsData->colorScheme()->colorNamed("AngularRuler"), 3.0, Qt::DotLine));
226 p.drawLine(
227 m_SkyMap->m_proj->toScreen(m_SkyMap->AngularRuler.point(
228 0)), // FIXME: More ugliness. m_proj should probably be a single-instance class, or we should have our own instance etc.
229 m_SkyMap->m_proj->toScreen(m_SkyMap->AngularRuler.point(
230 1))); // FIXME: Again, AngularRuler should be something better -- maybe a class in itself. After all it's used for more than one thing after we integrate the StarHop feature.
231}
232
234{
235 auto* data = m_KStarsData;
236 const SkyPoint centerSkyPoint = m_SkyMap->m_proj->fromScreen(
237 p.viewport().center(),
238 data);
239
240 QPointF centerScreenPoint = p.viewport().center();
241 double northRotation = m_SkyMap->m_proj->findNorthPA(
242 &centerSkyPoint, centerScreenPoint.x(), centerScreenPoint.y());
243 double zenithRotation = m_SkyMap->m_proj->findZenithPA(
244 &centerSkyPoint, centerScreenPoint.x(), centerScreenPoint.y());
245
246 QColor overlayColor(data->colorScheme()->colorNamed("CompassColor"));
247 p.setPen(Qt::NoPen);
248 auto drawArrow = [&](double angle, const QString & marker, const float labelRadius, const bool primary)
249 {
250 constexpr float radius = 150.0f; // In pixels
251 const auto fontMetrics = QFontMetricsF(QFont());
252 QTransform transform;
253 QColor color = overlayColor;
254 color.setAlphaF(primary ? 1.0 : 0.75);
255 QPen pen(color, 1.0, primary ? Qt::SolidLine : Qt::DotLine);
256 QBrush brush(color);
257
258 QPainterPath arrowstem;
259 arrowstem.moveTo(0.f, 0.f);
260 arrowstem.lineTo(0.f, -radius + radius / 7.5f);
261 transform.reset();
262 transform.translate(centerScreenPoint.x(), centerScreenPoint.y());
263 transform.rotate(angle);
264 arrowstem = transform.map(arrowstem);
265 p.strokePath(arrowstem, pen);
266
267 QPainterPath arrowhead;
268 arrowhead.moveTo(0.f, 0.f);
269 arrowhead.lineTo(-radius / 30.f, radius / 7.5f);
270 arrowhead.lineTo(radius / 30.f, radius / 7.5f);
271 arrowhead.lineTo(0.f, 0.f);
272 arrowhead.addText(QPointF(-1.1 * fontMetrics.averageCharWidth() * marker.size(),
273 radius / 7.5f + 1.2f * fontMetrics.ascent()),
274 QFont(), marker);
275 transform.translate(0, -radius);
276 arrowhead = transform.map(arrowhead);
277 p.fillPath(arrowhead, brush);
278
279 if (labelRadius > 0.f)
280 {
281 QRectF angleMarkerRect(centerScreenPoint.x() - labelRadius, centerScreenPoint.y() - labelRadius,
282 2.f * labelRadius, 2.f * labelRadius);
283 p.setPen(pen);
284 if (abs(angle) < 0.01)
285 {
286 angle = 0.;
287 }
288 double arcAngle = angle <= 0. ? -angle : 360. - angle;
289 p.drawArc(angleMarkerRect, 90 * 16, int(arcAngle * 16.));
290
291 QPainterPath angleLabel;
292 QString angleLabelText = QString::number(int(round(arcAngle))) + "°";
293 angleLabel.addText(QPointF(-(fontMetrics.averageCharWidth()*angleLabelText.size()) / 2.f, 1.2f * fontMetrics.ascent()),
294 QFont(), angleLabelText);
295 transform.reset();
296 transform.translate(centerScreenPoint.x(), centerScreenPoint.y());
297 transform.rotate(angle);
298 transform.translate(0, -labelRadius);
299 transform.rotate(90);
300 angleLabel = transform.map(angleLabel);
301 p.fillPath(angleLabel, brush);
302 }
303
304 };
305 auto eastRotation = northRotation + (m_SkyMap->m_proj->viewParams().mirror ? 90 : -90);
306 drawArrow(northRotation, i18nc("North", "N"), 80.f, !Options::useAltAz());
307 drawArrow(eastRotation, i18nc("East", "E"), -1.f, !Options::useAltAz());
308 drawArrow(zenithRotation, i18nc("Zenith", "Z"), 40.f, Options::useAltAz());
309}
310
312{
313 //draw the manual zoom-box, if it exists
314 if (m_SkyMap->ZoomRect.isValid())
315 {
317 p.drawRect(m_SkyMap->ZoomRect.x(), m_SkyMap->ZoomRect.y(), m_SkyMap->ZoomRect.width(),
318 m_SkyMap->ZoomRect.height());
319 }
320}
321
323{
324 bool checkSlewing =
325 (m_SkyMap->slewing || (m_SkyMap->clockSlewing && m_KStarsData->clock()->isActive())) && Options::hideOnSlew();
326 if (checkSlewing && Options::hideLabels())
327 return;
328
329 SkyLabeler *skyLabeler = SkyLabeler::Instance();
330 skyLabeler->resetFont(); // use the zoom dependent font
331
332 skyLabeler->setPen(m_KStarsData->colorScheme()->colorNamed("UserLabelColor"));
333
334 bool drawPlanets = Options::showSolarSystem() && !(checkSlewing && Options::hidePlanets());
335 bool drawComets = drawPlanets && Options::showComets();
336 bool drawAsteroids = drawPlanets && Options::showAsteroids();
337 bool drawOther = Options::showDeepSky() && Options::showOther() && !(checkSlewing && Options::hideOther());
338 bool drawStars = Options::showStars();
339 bool hideFaintStars = checkSlewing && Options::hideStars();
340
341 //Attach a label to the centered object
342 if (m_SkyMap->focusObject() != nullptr && Options::useAutoLabel())
343 {
344 QPointF o =
345 m_SkyMap->m_proj->toScreen(m_SkyMap->focusObject()); // FIXME: Same thing. m_proj should be accessible here.
346 skyLabeler->drawNameLabel(m_SkyMap->focusObject(), o);
347 }
348
349 foreach (SkyObject *obj, labelObjects)
350 {
351 //Only draw an attached label if the object is being drawn to the map
352 //reproducing logic from other draw funcs here...not an optimal solution
353 if (obj->type() == SkyObject::STAR || obj->type() == SkyObject::CATALOG_STAR ||
354 obj->type() == SkyObject::MULT_STAR)
355 {
356 if (!drawStars)
357 continue;
358 // if ( obj->mag() > Options::magLimitDrawStar() ) continue;
359 if (hideFaintStars && obj->mag() > Options::magLimitHideStar())
360 continue;
361 }
362 if (obj->type() == SkyObject::PLANET)
363 {
364 if (!drawPlanets)
365 continue;
366 if (obj->name() == i18n("Sun") && !Options::showSun())
367 continue;
368 if (obj->name() == i18n("Mercury") && !Options::showMercury())
369 continue;
370 if (obj->name() == i18n("Venus") && !Options::showVenus())
371 continue;
372 if (obj->name() == i18n("Moon") && !Options::showMoon())
373 continue;
374 if (obj->name() == i18n("Mars") && !Options::showMars())
375 continue;
376 if (obj->name() == i18n("Jupiter") && !Options::showJupiter())
377 continue;
378 if (obj->name() == i18n("Saturn") && !Options::showSaturn())
379 continue;
380 if (obj->name() == i18n("Uranus") && !Options::showUranus())
381 continue;
382 if (obj->name() == i18n("Neptune") && !Options::showNeptune())
383 continue;
384 //if ( obj->name() == i18n( "Pluto" ) && ! Options::showPluto() ) continue;
385 }
386 if ((obj->type() >= SkyObject::OPEN_CLUSTER && obj->type() <= SkyObject::GALAXY) ||
387 (obj->type() >= SkyObject::ASTERISM && obj->type() <= SkyObject::QUASAR) ||
388 (obj->type() == SkyObject::RADIO_SOURCE))
389 {
390 if (((CatalogObject *)obj)->getCatalog().id == -1 && !drawOther)
391 continue;
392 }
393 if (obj->type() == SkyObject::COMET && !drawComets)
394 continue;
395 if (obj->type() == SkyObject::ASTEROID && !drawAsteroids)
396 continue;
397
398 if (!m_SkyMap->m_proj->checkVisibility(obj))
399 continue; // FIXME: m_proj should be a member of this class.
400 QPointF o = m_SkyMap->m_proj->toScreen(obj);
401 if (!m_SkyMap->m_proj->onScreen(o))
402 continue;
403
404 skyLabeler->drawNameLabel(obj, o);
405 }
406
407 skyLabeler->useStdFont(); // use the StdFont for the guides.
408}
409
411{
412 Q_UNUSED(psky)
413
414#ifdef HAVE_INDI
415
416 for (auto oneFOV : KStarsData::Instance()->getTransientFOVs())
417 {
418 QVariant visible = oneFOV->property("visible");
419 if (visible.isNull() || visible.toBool() == false)
420 continue;
421
422 if (oneFOV->objectName() == "sensor_fov")
423 {
424 oneFOV->setColor(KStars::Instance()->data()->colorScheme()->colorNamed("SensorFOVColor").name());
425 SkyPoint centerSkyPoint = SkyMap::Instance()->projector()->fromScreen(psky.viewport().center(),
426 KStarsData::Instance());
427 QPointF screenSkyPoint = psky.viewport().center();
428 double northRotation = SkyMap::Instance()->projector()->findNorthPA(&centerSkyPoint, screenSkyPoint.x(),
429 screenSkyPoint.y());
430 oneFOV->setCenter(centerSkyPoint);
431 oneFOV->setNorthPA(northRotation);
432 oneFOV->draw(psky, Options::zoomFactor());
433 }
434 else if (oneFOV->objectName() == "solver_fov")
435 {
436 bool isVisible = false;
437 SkyPoint p = oneFOV->center();
438 if (std::isnan(p.ra().Degrees()))
439 continue;
440
441 p.EquatorialToHorizontal(KStarsData::Instance()->lst(), KStarsData::Instance()->geo()->lat());
442 QPointF point = SkyMap::Instance()->projector()->toScreen(&p, true, &isVisible);
443 double northRotation = SkyMap::Instance()->projector()->findNorthPA(&p, point.x(), point.y());
444 oneFOV->setNorthPA(northRotation);
445 oneFOV->draw(psky, Options::zoomFactor());
446 }
447 }
448#endif
449}
450
452{
453 Q_UNUSED(psky)
454
455#ifdef HAVE_INDI
456 if (!Options::showTargetCrosshair())
457 return;
458
459 if (INDIListener::Instance()->size() == 0)
460 return;
461 SkyPoint indi_sp;
462
463 psky.setPen(QPen(QColor(m_KStarsData->colorScheme()->colorNamed("TargetColor"))));
464 psky.setBrush(Qt::NoBrush);
465 float pxperdegree = Options::zoomFactor() / 57.3;
466
467 for (auto &oneDevice : INDIListener::devices())
468 {
469 if (!(oneDevice->getDriverInterface() & INDI::BaseDevice::TELESCOPE_INTERFACE) || oneDevice->isConnected() == false)
470 continue;
471
472 auto mount = oneDevice->getMount();
473 if (!mount)
474 continue;
475
476 auto coordNP = mount->currentCoordinates();
477
478 QPointF P = m_SkyMap->m_proj->toScreen(&coordNP);
479 if (Options::useAntialias())
480 {
481 float s1 = 0.5 * pxperdegree;
482 float s2 = pxperdegree;
483 float s3 = 2.0 * pxperdegree;
484
485 float x0 = P.x();
486 float y0 = P.y();
487 float x1 = x0 - 0.5 * s1;
488 float y1 = y0 - 0.5 * s1;
489 float x2 = x0 - 0.5 * s2;
490 float y2 = y0 - 0.5 * s2;
491 float x3 = x0 - 0.5 * s3;
492 float y3 = y0 - 0.5 * s3;
493
494 //Draw radial lines
495 psky.drawLine(QPointF(x1, y0), QPointF(x3, y0));
496 psky.drawLine(QPointF(x0 + s2, y0), QPointF(x0 + 0.5 * s1, y0));
497 psky.drawLine(QPointF(x0, y1), QPointF(x0, y3));
498 psky.drawLine(QPointF(x0, y0 + 0.5 * s1), QPointF(x0, y0 + s2));
499 //Draw circles at 0.5 & 1 degrees
500 psky.drawEllipse(QRectF(x1, y1, s1, s1));
501 psky.drawEllipse(QRectF(x2, y2, s2, s2));
502
503 psky.drawText(QPointF(x0 + s2 + 2., y0), mount->getDeviceName());
504 }
505 else
506 {
507 int s1 = int(0.5 * pxperdegree);
508 int s2 = int(pxperdegree);
509 int s3 = int(2.0 * pxperdegree);
510
511 int x0 = int(P.x());
512 int y0 = int(P.y());
513 int x1 = x0 - s1 / 2;
514 int y1 = y0 - s1 / 2;
515 int x2 = x0 - s2 / 2;
516 int y2 = y0 - s2 / 2;
517 int x3 = x0 - s3 / 2;
518 int y3 = y0 - s3 / 2;
519
520 //Draw radial lines
521 psky.drawLine(QPoint(x1, y0), QPoint(x3, y0));
522 psky.drawLine(QPoint(x0 + s2, y0), QPoint(x0 + s1 / 2, y0));
523 psky.drawLine(QPoint(x0, y1), QPoint(x0, y3));
524 psky.drawLine(QPoint(x0, y0 + s1 / 2), QPoint(x0, y0 + s2));
525 //Draw circles at 0.5 & 1 degrees
526 psky.drawEllipse(QRect(x1, y1, s1, s1));
527 psky.drawEllipse(QRect(x2, y2, s2, s2));
528
529 psky.drawText(QPoint(x0 + s2 + 2, y0), mount->getDeviceName());
530 }
531 }
532#endif
533}
534
536{
537 SkyQPainter p(m_SkyMap, pd);
538 p.begin();
540
541 exportSkyImage(&p, scale);
542
543 p.end();
544}
545
547{
548 bool vectorStarState;
549 vectorStarState = painter->getVectorStars();
550 painter->setVectorStars(
551 true); // Since we are exporting an image, we may use vector stars without worrying about time
552 painter->setRenderHint(QPainter::Antialiasing, Options::useAntialias());
553
554 if (scale)
555 {
556 //scale sky image to fit paint device
557 qDebug() << Q_FUNC_INFO << "Scaling true while exporting Sky Image";
558 double xscale = double(painter->device()->width()) / double(m_SkyMap->width());
559 double yscale = double(painter->device()->height()) / double(m_SkyMap->height());
560 double scale = qMin(xscale, yscale);
561 qDebug() << Q_FUNC_INFO << "xscale: " << xscale << "yscale: " << yscale << "chosen scale: " << scale;
562 painter->scale(scale, scale);
563 }
564
565 painter->drawSkyBackground();
566 m_KStarsData->skyComposite()->draw(painter);
567 drawOverlays(*painter);
568 painter->setVectorStars(vectorStarState); // Restore the state of the painter
569}
570
571/* JM 2016-05-03: Not needed since we're not using OpenGL for now
572 * void SkyMapDrawAbstract::calculateFPS()
573{
574 if(m_framecount == 25) {
575 //float sec = m_fpstime.elapsed()/1000.;
576 // qDebug() << Q_FUNC_INFO << "FPS " << m_framecount/sec;
577 m_framecount = 0;
578 m_fpstime.restart();
579 }
580 ++m_framecount;
581}*/
582
584{
585 m_DrawLock = state;
586}
A simple container object to hold the minimum information for a Deep Sky Object to be drawn on the sk...
A simple class encapsulating a Field-of-View symbol.
Definition fov.h:28
void draw(QPainter &p, float zoomFactor)
draw the FOV symbol on a QPainter
Definition fov.cpp:230
KStarsData is the backbone of KStars.
Definition kstarsdata.h:74
static KStars * Instance()
Definition kstars.h:121
The purpose of this class is to prevent labels from overlapping.
Definition skylabeler.h:99
void resetFont()
sets the font in SkyLabeler and in psky back to the zoom dependent value that was set in reset().
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
void useStdFont()
sets the font in SkyLabeler and in psky to the font psky had originally when reset() was called.
bool drawNameLabel(SkyObject *obj, const QPointF &_p, const qreal padding_factor=1)
Tries to draw a label for an object.
static void setDrawLock(bool state)
Acquire / release a draw lock.
void drawOrientationArrows(QPainter &p)
Draw north and zenith arrows to show the orientation while rotating the sky map.
void drawZoomBox(QPainter &psky)
Draw a dotted-line rectangle which traces the potential new field-of-view in ZoomBox mode.
void drawTelescopeSymbols(QPainter &psky)
Draw symbols at the position of each Telescope currently being controlled by KStars.
void drawAngleRuler(QPainter &psky)
Draw a dashed line from the Angular-Ruler start point to the current mouse cursor,...
void drawSolverFOV(QPainter &psky)
Draw FOV of solved image in Ekos Alignment Module.
void drawObjectLabels(QList< SkyObject * > &labelObjects)
Draw "user labels".
void exportSkyImage(QPaintDevice *pd, bool scale=false)
Draw the current Sky map to a pixmap which is to be printed or exported to a file.
void drawOverlays(QPainter &p, bool drawFov=true)
Draw the overlays on top of the sky map.
void drawDomeSlits(QPainter &psky)
Draw dome slits for connected domes.
SkyMapDrawAbstract(SkyMap *sm)
Constructor that sets data and m_SkyMap, and initializes the FPS counters.
This is the canvas on which the sky is painted.
Definition skymap.h:54
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:50
virtual QString name(void) const
Definition skyobject.h:154
int type(void) const
Definition skyobject.h:212
float mag() const
Definition skyobject.h:236
The sky coordinates of a point in the sky.
Definition skypoint.h:45
const CachingDms & ra() const
Definition skypoint.h:263
void HorizontalToEquatorialNow()
Convenience method for Horizontal -> Equatorial at simulation time.
Definition skypoint.cpp:199
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates,...
Definition skypoint.cpp:77
void setAlt(dms alt)
Sets Alt, the Altitude.
Definition skypoint.h:194
void setAz(dms az)
Sets Az, the Azimuth.
Definition skypoint.h:230
The QPainter-based painting backend.
Definition skyqpainter.h:31
void end() override
End and finalize painting.
void drawSkyBackground() override
Draw the sky background.
void setVectorStars(bool vectorStars)
Definition skyqpainter.h:69
void begin() override
Begin painting.
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
const double & Degrees() const
Definition dms.h:141
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
void setAlpha(int alpha)
void setAlphaF(float alpha)
int height() const const
int width() const const
SmoothPixmapTransform
QPaintDevice * device() const const
void drawArc(const QRect &rectangle, int startAngle, int spanAngle)
void drawEllipse(const QPoint &center, int rx, int ry)
void drawLine(const QLine &line)
void drawRect(const QRect &rectangle)
void drawText(const QPoint &position, const QString &text)
void fillPath(const QPainterPath &path, const QBrush &brush)
void scale(qreal sx, qreal sy)
void setBrush(Qt::BrushStyle style)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
void strokePath(const QPainterPath &path, const QPen &pen)
QRect viewport() const const
void addText(const QPointF &point, const QFont &font, const QString &text)
void lineTo(const QPointF &endPoint)
void moveTo(const QPointF &point)
qreal x() const const
qreal y() const const
QPoint center() const const
QString number(double n, char format, int precision)
qsizetype size() const const
bool isNull() const const
bool toBool() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.