Warning, file /education/cantor/src/lib/imageresult.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2009 Alexander Rieder <alexanderrieder@gmail.com>
0004 */
0005 
0006 #ifndef _IMAGERESULT_H
0007 #define _IMAGERESULT_H
0008 
0009 #include "result.h"
0010 #include <QUrl>
0011 #include <QSize>
0012 
0013 class QImage;
0014 
0015 namespace Cantor
0016 {
0017 class ImageResultPrivate;
0018 
0019 class CANTOR_EXPORT ImageResult : public Result
0020 {
0021   public:
0022     enum{Type=2};
0023     explicit ImageResult( const QUrl& url, const QString& alt=QString());
0024     explicit ImageResult( const QImage& image, const QString& alt=QString());
0025     ~ImageResult() override;
0026 
0027     QString toHtml() override;
0028     QString toLatex() override;
0029     QVariant data() override;
0030     QUrl url() override;
0031 
0032     int type() override;
0033     QString mimeType() override;
0034 
0035     QSize displaySize();
0036     void setDisplaySize(QSize size);
0037 
0038     QString originalFormat();
0039     void setOriginalFormat(const QString& format);
0040     void setSvgContent(const QString& svgContent);
0041 
0042     QDomElement toXml(QDomDocument& doc) override;
0043     QJsonValue toJupyterJson() override;
0044     void saveAdditionalData(KZip* archive) override;
0045 
0046     void save(const QString& filename) override;
0047 
0048   private:
0049     ImageResultPrivate* d;
0050 };
0051 
0052 }
0053 
0054 #endif /* _IMAGERESULT_H */