Kstars
eyepiecefield.cpp
138 double altAzRot = (m_usedAltAz ? 0.0 : findNorthAngle(m_sp, KStarsData::Instance()->geo()->lat()).Degrees());
177void EyepieceField::showEyepieceField(SkyPoint *sp, FOV const *const fov, const QString &imagePath)
206void EyepieceField::showEyepieceField(SkyPoint *sp, const double fovWidth, double fovHeight, const QString &imagePath)
262void EyepieceField::generateEyepieceView(SkyPoint *sp, QImage *skyChart, QImage *skyImage, double fovWidth,
283 // Otherwise, we will assume that the user wants the FOV of the image and we'll try to guess it from there
360 QImage *mySkyChart = new QImage(arcMinToScreen * fovWidth * 2.0, arcMinToScreen * fovHeight * 2.0,
386 QImage *mySkyImage = new QImage(int(arcMinToScreen * fovWidth * 2.0), int(arcMinToScreen * fovHeight * 2.0),
427void EyepieceField::renderEyepieceView(const QImage *skyChart, QPixmap *renderChart, const double rotation,
448 Q_ASSERT(overlay || renderImage); // in debug mode, check for calls that supply skyImage but not renderImage
470 skyChart->createMaskFromColor(skyColor.rgb()).transformed(transform, Qt::SmoothTransformation));
488void EyepieceField::renderEyepieceView(SkyPoint *sp, QPixmap *renderChart, double fovWidth, double fovHeight,
498 renderEyepieceView(skyChart, renderChart, rotation, scale, flip, invert, skyImage, renderImage, overlay,
514 renderEyepieceView(m_skyChart.get(), &m_renderChart, rotation, 1.0, flip, invert, m_skyImage.get(), &m_renderImage,
534 m_skyChartDisplay->setPixmap(m_renderChart.scaled(m_skyChartDisplay->width(), m_skyChartDisplay->height(),
582 new ExportEyepieceView(m_sp, *m_dt, ((m_skyImage.get() && !overlay) ? &m_renderImage : nullptr),
603 3600.0); // Equinox precession in ecliptic longitude per year in degrees (ref: http://star-www.st-and.ac.uk/~fv/webnotes/chapt16.htm)
604 dms netEquinoxPrecession(((sp->getLastPrecessJD() - J2000) / 365.25) * equinoxPrecessionPerYear);
606 (netEquinoxPrecession.cos() - sp->dec0().sin() * sp->dec().sin()) / (sp->dec0().cos() * sp->dec().cos());
612 // We trust that EquatorialToHorizontal has been called on sp, after all, how else can it have an alt/az representation.
613 // Use spherical cosine rule (the triangle with vertices at sp, zenith and NCP) to compute the angle between direction of increasing altitude and north
614 double cosNorthAngle2 = (lat->sin() - sp->alt().sin() * sp->dec().sin()) / (sp->alt().cos() * sp->dec().cos());
619 qCDebug(KSTARS) << "Data: alt = " << sp->alt().toDMSString() << "; az = " << sp->az().toDMSString() << "; ra, dec ("
620 << sp->getLastPrecessJD() / 365.25 << ") = " << sp->ra().toHMSString() << "," << sp->dec().toDMSString()
Dialog to export the eyepiece view as an image, with some annotations for field-use.
Definition exporteyepieceview.h:29
static void generateEyepieceView(SkyPoint *sp, QImage *skyChart, QImage *skyImage=nullptr, double fovWidth=-1.0, double fovHeight=-1.0, const QString &imagePath=QString())
Generate the eyepiece field view and corresponding image view.
Definition eyepiecefield.cpp:262
void showEyepieceField(SkyPoint *sp, FOV const *const fov=nullptr, const QString &imagePath=QString())
Show the eyepiece field dialog.
Definition eyepiecefield.cpp:177
static dms findNorthAngle(const SkyPoint *sp, const dms *lat)
Finds the angle between "up" (i.e.
Definition eyepiecefield.cpp:586
static void renderEyepieceView(const QImage *skyChart, QPixmap *renderChart, const double rotation=0, const double scale=1.0, const bool flip=false, const bool invert=false, const QImage *skyImage=nullptr, QPixmap *renderImage=nullptr, const bool overlay=false, const bool invertColors=false)
Orients the eyepiece view as needed, performs overlaying etc.
Definition eyepiecefield.cpp:427
void render()
Re-renders the view Takes care of things like inverting colors, inverting orientation,...
Definition eyepiecefield.cpp:504
void startSingleDownload(const QUrl srcUrl, const QString &destFileName, KSDssImage::Metadata &md)
Stateful single-download of a supplied URL.
Definition ksdssdownloader.cpp:218
static QString getDSSURL(const SkyPoint *const p, const QString &version="all", struct KSDssImage::Metadata *md=nullptr)
High-level method to create a URL to obtain a DSS image for a given SkyPoint.
Definition ksdssdownloader.cpp:49
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Definition kstarsdatetime.h:36
Q_SCRIPTABLE Q_NOREPLY void setApproxFOV(double FOV_Degrees)
DBUS interface function.
Definition kstarsdbus.cpp:993
virtual void updateCoordsNow(const KSNumbers *num)
updateCoordsNow Shortcut for updateCoords( const KSNumbers *num, false, nullptr, nullptr,...
Definition skypoint.h:382
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
virtual void updateCoords(const KSNumbers *num, bool includePlanets=true, const CachingDms *lat=nullptr, const CachingDms *LST=nullptr, bool forceRecompute=false)
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0),...
Definition skypoint.cpp:582
const dms reduce() const
return the equivalent angle between 0 and 360 degrees.
Definition dms.cpp:251
static constexpr double PI
PI is a const static member; it's public so that it can be used anywhere, as long as dms....
Definition dms.h:385
const QString toDMSString(const bool forceSign=false, const bool machineReadable=false, const bool highPrecision=false) const
Definition dms.cpp:287
const QString toHMSString(const bool machineReadable=false, const bool highPrecision=false) const
Definition dms.cpp:378
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
void setChecked(bool)
void setMaximum(int)
void setMinimum(int)
void setPageStep(int)
void setValue(int)
QBitmap fromImage(QImage &&image, Qt::ImageConversionFlags flags)
void addLayout(QLayout *layout, int stretch)
void addStretch(int stretch)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QRgb rgb() const const
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
currentIndex
void accepted()
virtual void reject()
void rejected()
AcceptRole
QPushButton * addButton(StandardButton button)
bool exists() const const
virtual void close() override
Format_ARGB32
QImage createMaskFromColor(QRgb color, Qt::MaskMode mode) const const
void fill(Qt::GlobalColor color)
int height() const const
void invertPixels(InvertMode mode)
bool isNull() const const
QImage scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
QImage transformed(const QTransform &matrix, Qt::TransformationMode mode) const const
int width() const const
void setPixmap(const QPixmap &)
void setScaledContents(bool)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void drawImage(const QPoint &point, const QImage &image)
bool end()
Base
void fill(const QColor &color)
QPixmap fromImage(QImage &&image, Qt::ImageConversionFlags flags)
int height() const const
QPixmap scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
void setMask(const QBitmap &mask)
QImage toImage() const const
int width() const const
Preferred
void setTickInterval(int ti)
void setFileName(const QString &fileName)
void setResolution(int dpi)
void setSize(const QSize &size)
void setViewBox(const QRect &viewBox)
void render(QPainter *painter)
IgnoreAspectRatio
transparent
Horizontal
SmoothTransformation
Tool
virtual QString fileName() const const override
bool open()
QWidget(QWidget *parent, Qt::WindowFlags f)
height
QRegion mask() const const
void setMinimumWidth(int minw)
void setBackgroundRole(QPalette::ColorRole role)
void setLayout(QLayout *layout)
void show()
void setSizePolicy(QSizePolicy)
void update()
virtual void setVisible(bool visible)
width
void setWindowFlags(Qt::WindowFlags type)
void setWindowTitle(const QString &)
Structure to hold some DSS image metadata.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 6 2024 11:56:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 6 2024 11:56:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.