Kstars
9#include "auxiliary/filedownloader.h"
20class ImageLabel :
public QFrame
25 ~ImageLabel()
override =
default;
26 void setImage(
const QImage &img);
32 void paintEvent(QPaintEvent *e)
override;
33 void resizeEvent(QResizeEvent *)
override;
62 explicit ImageViewer(
const QString &caption,
QWidget *
parent =
nullptr);
65 explicit ImageViewer(
const QUrl &imageURL,
const QString &capText = QString(),
QWidget *
parent =
nullptr);
68 ~ImageViewer()
override;
75 bool loadImage(
const QString &filename);
77 QJsonObject metadata();
88 void loadImageFromURL();
91 void saveFile(QUrl &url);
95 const QUrl m_ImageUrl;
96 bool fileIsImage {
false };
99 FileDownloader downloadJob;
101 ImageLabel *m_View {
nullptr };
102 QLabel *m_Caption {
nullptr };
109 void init(QString caption, QString capText);
113 void downloadReady();
114 void downloadError(
const QString &errorString);
117 void saveFileToDisc();
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:54:26 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.