X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fapisurface.h;h=79afaf927ca5ccc9780b0de69dfb430d0e8814d4;hb=a69f0de6b922160bec029cfd18b5002b904afccf;hp=bdf21a38a040d2255f0dc3282a99aa0ebfddd12a;hpb=18081d51fb0a0a5b1b7cb9fa2923339fae58de7b;p=apitrace diff --git a/gui/apisurface.h b/gui/apisurface.h index bdf21a3..79afaf9 100644 --- a/gui/apisurface.h +++ b/gui/apisurface.h @@ -5,6 +5,10 @@ #include #include +namespace image { + class Image; +} + class ApiSurface { public: @@ -13,19 +17,27 @@ public: QSize size() const; void setSize(const QSize &size); - int numChannels() const; - void setNumChannels(int numChannels); + int depth() const; + void setDepth(int depth); + + QString formatName() const; + void setFormatName(const QString &str); void contentsFromBase64(const QByteArray &base64); - QImage image() const; + QByteArray base64Data() const; QImage thumb() const; + static image::Image *imageFromBase64(const QByteArray &data); + static QImage qimageFromRawImage(const image::Image *img); + private: QSize m_size; int m_numChannels; - QImage m_image; + QByteArray m_base64Data; QImage m_thumb; + int m_depth; + QString m_formatName; };