Kstars
skymaplite.cpp
143 QSGNode *SkyMapLite::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
148 /* This code deletes all nodes that are representing dynamic stars and not needed anymore (under construction) */
201 double lim = (MAXZOOM / MINZOOM) / sqrt(Options::zoomFactor()) / 3; //(MAXZOOM/MINZOOM - Options::zoomFactor())/130;
342 qDebug() << "Centering on " << focusPoint()->ra().toHMSString() << " " << focusPoint()->dec().toDMSString();
352 if (Options::useAltAz() && Options::showGround() && focus()->alt().Degrees() > SkyPoint::altCrit &&
356 QString message = i18n("The requested position is below the horizon.\nWould you like to go there anyway?");
358 KGuiItem(i18n("Go Anyway")), KGuiItem(i18n("Keep Position")), "dag_focus_below_horiz" )==KMessageBox::No ) {
372 kstars->actionCollection()->action("track_object")->setIcon( QIcon::fromTheme("document-encrypt") );
909 QSGTexture *texture = window()->createTextureFromImage(label, QQuickWindow::TextureCanUseAtlas);
984 setFocusAltAz(SkyPoint::unrefract(dms(m_deviceOrientation->getAltitude())), dms(m_deviceOrientation->getAzimuth()));
static double unrefract(const double alt, bool conditional=true)
Remove refraction correction, depending on conditional.
Definition: skypoint.cpp:1091
Antialiasing
void append(const T &value)
bool centerLocked
true if SkyMapLite is centered on an object and only pinch-to-zoom needs to be available
Definition: skymaplite.h:74
This class loads QML files and connects SkyMapLite and KStarsData Unlike KStars class it is not a mai...
Definition: kstarslite.h:46
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:380
void setPen(const QColor &color)
void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a) const const
static SkyMapLite * createInstance()
Creates instance of SkyMapLite (delete the old one if any)
Definition: skymaplite.cpp:215
void append(const T &value)
void setFocus(SkyPoint *f)
sets the central focus point of the sky map.
Definition: skymaplite.cpp:252
Format_ARGB32_Premultiplied
A container for nodes that holds collection of textures for stars and provides clipping.
Definition: rootnode.h:59
void updateAutomaticMode()
updates focus of SkyMapLite according to data from DeviceOrientation (Smartphone's sensors)
Definition: skymaplite.cpp:978
void drawEllipse(const QRectF &rectangle)
int width(const QString &text, int len) const const
Definition: clientmanagerlite.h:40
QVector::iterator begin()
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
virtual QSGNode * updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override
Updates SkyMapLite by calling RootNode::update(), which in turn initiates update of all child nodes.
Definition: skymaplite.cpp:143
int count(const T &value) const const
QSizeF size() const const
TextureCanUseAtlas
QQuickWindow * window() const const
void aperture(SkyPoint *center, double radius, MeshBufNum_t bufNum=DRAW_BUF)
finds the set of trixels that cover the circular aperture specified after first performing a reverse ...
Definition: skymesh.cpp:56
void append(const T &value)
Definition: kstarsdata.h:70
void destinationChanged()
Emitted by setDestination(), and connected to slewFocus().
void fill(const QColor &color)
void setDestination(const SkyPoint &f)
sets the destination point of the sky map.
Definition: skymaplite.cpp:278
void slotSelectObject(SkyObject *skyObj)
centres skyObj in SkyMap and opens context drawer with skyObj Used in FindDialogLite
Definition: skymaplite.cpp:590
void initialize(QQuickItem *parent)
Bind size to parent's size and initialize star images.
Definition: skymaplite.cpp:222
int harvardToIndex(char c)
Returns index for a Harvard spectral classification.
Definition: skymaplite.cpp:809
void setFocusAltAz(const dms &alt, const dms &az)
sets the focus point of the sky map, using its alt/az coordinates
Definition: skymaplite.cpp:266
void setupProjector()
Call to set up the projector before update of SkyItems positions begins.
Definition: skymaplite.cpp:735
int descent() const const
const QPen & pen() const const
Definition: lambertprojector.h:18
AllButtons
void slotUpdateSky(bool now)
Update the focus point and call forceUpdate()
Definition: skymaplite.cpp:683
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 drawText(const QPointF &position, const QString &text)
void updateTime(const bool automaticDSTchange=true)
Update time-dependent data and (possibly) repaint the sky map.
Definition: kstarslite.cpp:234
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
const QString toHMSString(const bool machineReadable=false, const bool highPrecision=false) const
Definition: dms.cpp:370
void updateFocus()
Update the focus position according to current options.
Definition: skymaplite.cpp:690
QSGTexture * createTextureFromImage(const QImage &image) const const
void slotClockSlewing()
Checks whether the timestep exceeds a threshold value.
Definition: skymaplite.cpp:516
bool begin(QPaintDevice *device)
static double deleteLimit()
return limit of hides for the node to delete it
Definition: skymaplite.cpp:199
int size() const const
void update()
bool getSlewing() const
Proxy method for SkyMapDrawAbstract::drawObjectLabels()
Definition: skymaplite.h:422
Q_INVOKABLE void addFOVSymbol(const QString &FOVName, bool initialState=false)
adds FOV symbol to m_FOVSymbols
Definition: skymaplite.cpp:918
void start(int msec)
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
bool end()
KeepAspectRatio
QCursor cursor() const const
parent
QString i18n(const char *text, const TYPE &arg...)
void slewingChanged(bool)
Emitted when SkyMapLite is being slewed or slewing is finished.
const QString toDMSString(const bool forceSign=false, const bool machineReadable=false, const bool highPrecision=false) const
Definition: dms.cpp:279
QSGTexture * getCachedTexture(int size, char spType)
returns cached texture from textureCache.
Definition: skymaplite.cpp:210
SizeAllCursor
bool isManualMode() const
Manual Mode is a new (04/2002) addition to the SimClock.
Definition: simclock.h:68
This is just a container that holds information needed to do projections.
Definition: projector.h:36
SkyObject * focusObject() const
Retrieve the object which is centered in the sky map.
Definition: skymaplite.h:252
Definition: skyobjectlite.h:20
void setObject(SkyObject *object)
sets SkyObject that is needed to be wrapped
Definition: skyobjectlite.cpp:11
QSGTexture * textToTexture(QString text, QColor color=QColor(255, 255, 255), bool zoomFont=false)
creates QImage from text and converts it to QSGTexture
Definition: skymaplite.cpp:848
void heightChanged()
QVector< QVector< QPixmap * > > getImageCache()
returns cache of star images
Definition: skymaplite.cpp:843
QColor fromRgb(QRgb rgb)
void setBrush(const QBrush &brush)
Definition: inditelescopelite.h:26
static const double altCrit
Critical height for atmospheric refraction corrections.
Definition: skypoint.h:718
void set(const dms &r, const dms &d)
Sets RA, Dec and RA0, Dec0 according to arguments.
Definition: skypoint.cpp:63
void setPoint(SkyPoint *point)
sets SkyPoint that is needed to be wrapped
Definition: skypointlite.cpp:12
void setFocusPoint(SkyPoint *f)
set the FocusPoint; the position that is to be the next Destination.
Definition: skymaplite.h:204
void symbolsFOVChanged(QStringList)
Emitted when FOVSymbols list was changed (new value appended)
void resizeItem()
Called whenever wrappers' width or height are changed.
Definition: skymaplite.cpp:565
bool fillGround
If the ground is filled, then points below horizon are invisible.
Definition: projector.h:43
static SkyMesh * Instance()
returns the default instance of SkyMesh or null if it has not yet been created.
Definition: skymesh.cpp:39
void mousePointChanged(SkyPoint *)
Emitted when position under mouse changed.
void setViewParams(const ViewParams &p)
Update cached values for projector.
Definition: projector.cpp:46
void setFocusObject(SkyObject *o)
Set the FocusObject pointer to the argument.
Definition: skymaplite.cpp:318
void setSnapNextFocus(bool b=true)
Disable or re-enable the slewing animation for the next Focus change.
Definition: kstarsdata.h:282
Q_INVOKABLE void setFOVVisible(int index, bool visible)
updates visibility of FOV symbol according to visible
Definition: skymaplite.cpp:932
QVector::iterator end()
Item for displaying sky objects; also handles user interaction events.
Definition: skymaplite.h:58
void forceUpdate()
Recalculates the positions of objects in the sky, and then repaints the sky map.
Definition: skymaplite.cpp:639
void setCursor(const QCursor &cursor)
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
void deleteSkyNode(SkyNode *skyNode)
skyNode will be deleted on the next call to updatePaintNode (currently used only in StarNode(struct i...
Definition: skymaplite.cpp:205
void drawPoint(const QPointF &position)
void setManualMode(bool on=true)
Sets Manual Mode on/off according to the bool argument.
Definition: simclock.cpp:61
void drawLine(const QLineF &line)
void setCenterLocked(bool centerLocked)
sets whether SkyMapLite is centered on an object and locked(olny pinch-to-zoom is available)
Definition: skymaplite.cpp:950
QColor color() const const
int length() const const
void setClickedPoint(SkyPoint *f)
Set the ClickedPoint to the skypoint given as an argument.
Definition: skymaplite.cpp:306
Definition: gnomonicprojector.h:18
void clear()
SkyPoint * focus()
Retrieve the Focus point; the position on the sky at the center of the skymap.
Definition: skymaplite.h:125
void HorizontalToEquatorial(const dms *LST, const dms *lat)
Determine the (RA, Dec) coordinates of the SkyPoint from its (Altitude, Azimuth) coordinates,...
Definition: skypoint.cpp:143
void setDestinationAltAz(const dms &alt, const dms &az, bool altIsRefracted)
sets the destination point of the sky map, using its alt/az coordinates.
Definition: skymaplite.cpp:290
ClientManagerLite * clientManagerLite() const
Definition: kstarslite.h:107
visible
Provides virtual functions for update of coordinates and nodes hiding.
Definition: skynode.h:27
void setHsvF(qreal h, qreal s, qreal v, qreal a)
Definition: orthographicprojector.h:18
void setRenderHint(QPainter::RenderHint hint, bool on)
Q_INVOKABLE bool isActive()
Whether the clock is active or not is a bit complicated by the introduction of "manual mode".
Definition: simclock.cpp:96
void setFont(const QFont &font)
Trixel index(const SkyPoint *p)
returns the index of the trixel containing p.
Definition: skymesh.cpp:74
void skyRotationChanged(double skyRotation)
Emitted when skyRotation used to rotate coordinates of SkyPoints is changed.
SmoothTransformation
void setSlewing(bool newSlewing)
sets whether SkyMapLite is being slewed
Definition: skymaplite.cpp:941
int height() const const
qreal effectiveDevicePixelRatio() const const
Definition: skypointlite.h:21
void initStarImages()
Initializes images of Stars and puts them in cache (copied from SkyQPainter)
Definition: skymaplite.cpp:995
QString message
T value(int i) const const
color0
void widthChanged()
void addTelescope(INDI::BaseDevice *bd)
Add telescope symbol for device bd.
Definition: telescopesymbolsitem.cpp:25
Q_INVOKABLE void setAutomaticMode(bool automaticMode)
switch automatic mode on/off according to isOn parameter
Definition: skymaplite.cpp:956
void setClickedObject(SkyObject *o)
Set the ClickedObject pointer to the argument.
Definition: skymaplite.cpp:312
Definition: skymesh.h:73
void removeTelescope(INDI::BaseDevice *bd)
Remove telescope symbol of device bd.
Definition: telescopesymbolsitem.cpp:36
QString & fill(QChar ch, int size)
void update(bool clearTextures=false)
update positions of all child SkyItems
Definition: rootnode.cpp:216
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:57:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:57:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.