Kstars

fitsoverlay.h
1/*
2 SPDX-FileCopyrightText: 2012 Jasem Mutlaq <mutlaqja@ikarustech.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QPixmap>
10#include <KIO/Job>
11#include <QFile>
12
13#include "dms.h"
14
15class FITSImage;
16class SkyPoint;
17
18typedef struct
19{
20 FITSImage *image_data;
21 dms ra, dec;
22 int pix_width, pix_height;
23 QPixmap pix;
24} FOverlay;
25
26class FITSOverlay : public QObject
27{
29
30 public:
31 FITSOverlay();
32 ~FITSOverlay();
33
34 void addFITSOverlay(const dms &ra, const dms &dec, const QUrl &imageURL);
35 //void removeFITSOverlay(const SkyPoint *clickedPoint);
36
37 //const QPixmap *getPixmap() { return &pix;}
38 //const SkyPoint *getCoord() { return coord; }
39
40 bool contains(const dms &ra, const dms &dec);
41
42 QList<FOverlay *> getOverlays() { return fList; }
43
44 private:
45 void loadImageFromURL();
46 void openImage();
47
48 QUrl m_ImageUrl;
49 KIO::Job *downloadJob { nullptr }; // download job of image -> 0 == no job is running
50 QString filename;
51 QFile file;
52 dms ra, dec;
53
55
56 private slots:
57 /**Make sure download has finished, then make sure file exists, then save the image */
58 void downloadReady(KJob *);
59};
The sky coordinates of a point in the sky.
Definition skypoint.h:45
const CachingDms & dec() const
Definition skypoint.h:269
const CachingDms & ra() const
Definition skypoint.h:263
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:57:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.