]> git.cworth.org Git - apitrace/blobdiff - gui/apisurface.cpp
Added alt menu shortcuts for View menu.
[apitrace] / gui / apisurface.cpp
index b8e820bc82f16f333aed5639fa0e59e93207f0f8..bfc6cfdf128038d6e6b18a6afb057ebeb53e50e2 100644 (file)
@@ -1,4 +1,5 @@
 #include "apisurface.h"
+#include "thumbnail.h"
 
 #include <QDebug>
 #include <QSysInfo>
@@ -31,7 +32,7 @@ void ApiSurface::contentsFromBase64(const QByteArray &base64)
 {
     QByteArray dataArray = QByteArray::fromBase64(base64);
     m_image.loadFromData(dataArray, "png");
-    m_thumb = m_image.scaled(64, 64, Qt::KeepAspectRatio);
+    m_thumb = thumbnail(m_image);
 }
 
 QImage ApiSurface::image() const
@@ -44,7 +45,6 @@ QImage ApiSurface::thumb() const
     return m_thumb;
 }
 
-
 int ApiSurface::depth() const
 {
     return m_depth;
@@ -55,6 +55,17 @@ void ApiSurface::setDepth(int depth)
     m_depth = depth;
 }
 
+QString ApiSurface::formatName() const
+{
+    return m_formatName;
+}
+
+void ApiSurface::setFormatName(const QString &str)
+{
+    m_formatName = str;
+}
+
+
 ApiTexture::ApiTexture()
     : ApiSurface()
 {