summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2015-05-27 20:52:51 +0100
committerJose Fonseca <jfonseca@vmware.com>2015-05-27 20:52:51 +0100
commit93a7c0c9f092fb2454812085da749ac7d5ba7899 (patch)
tree1e5e6ae7906f594904967b0e1919b5427dfba66b /gui
parent4734e110ce60fa004d67db0a5e39e2e8d03cec9e (diff)
gui: Remove base64 from method/member names.
We no longer use base64.
Diffstat (limited to 'gui')
-rw-r--r--gui/apisurface.cpp13
-rw-r--r--gui/apisurface.h8
-rw-r--r--gui/apitracecall.cpp4
-rw-r--r--gui/imageviewer.cpp4
-rw-r--r--gui/imageviewer.h2
-rw-r--r--gui/mainwindow.cpp8
6 files changed, 19 insertions, 20 deletions
diff --git a/gui/apisurface.cpp b/gui/apisurface.cpp
index 8d95db90..4f0a9173 100644
--- a/gui/apisurface.cpp
+++ b/gui/apisurface.cpp
@@ -31,23 +31,23 @@ struct ByteArrayBuf : public std::streambuf
}
};
-void ApiSurface::contentsFromBase64(const QByteArray &base64)
+void ApiSurface::setData(const QByteArray &data)
{
- m_base64Data = base64;
+ m_data = data;
/*
* We need to do the conversion to create the thumbnail
*/
- image::Image *image = imageFromBase64(base64);
+ image::Image *image = imageFromData(data);
Q_ASSERT(image);
QImage img = qimageFromRawImage(image);
m_thumb = thumbnail(img);
delete image;
}
-QByteArray ApiSurface::base64Data() const
+QByteArray ApiSurface::data() const
{
- return m_base64Data;
+ return m_data;
}
QImage ApiSurface::thumb() const
@@ -107,9 +107,8 @@ void ApiFramebuffer::setType(const QString &str)
}
image::Image *
-ApiSurface::imageFromBase64(const QByteArray &dataArray)
+ApiSurface::imageFromData(const QByteArray &dataArray)
{
- //QByteArray dataArray = QByteArray::fromBase64(base64);
image::Image *image;
/*
diff --git a/gui/apisurface.h b/gui/apisurface.h
index 6cb9efd3..de5f531d 100644
--- a/gui/apisurface.h
+++ b/gui/apisurface.h
@@ -22,12 +22,12 @@ public:
QString formatName() const;
void setFormatName(const QString &str);
- void contentsFromBase64(const QByteArray &base64);
+ void setData(const QByteArray &data);
- QByteArray base64Data() const;
+ QByteArray data() const;
QImage thumb() const;
- static image::Image *imageFromBase64(const QByteArray &data);
+ static image::Image *imageFromData(const QByteArray &data);
static QImage qimageFromRawImage(const image::Image *img,
float lowerValue = 0.0f,
float upperValue = 1.0f,
@@ -36,7 +36,7 @@ public:
private:
QSize m_size;
- QByteArray m_base64Data;
+ QByteArray m_data;
QImage m_thumb;
int m_depth;
QString m_formatName;
diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp
index 3faccb5b..35235ac2 100644
--- a/gui/apitracecall.cpp
+++ b/gui/apitracecall.cpp
@@ -482,7 +482,7 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson)
tex.setDepth(depth);
tex.setFormatName(formatName);
tex.setLabel(label);
- tex.contentsFromBase64(dataArray);
+ tex.setData(dataArray);
m_textures.append(tex);
}
@@ -512,7 +512,7 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson)
fbo.setDepth(depth);
fbo.setFormatName(formatName);
fbo.setType(label);
- fbo.contentsFromBase64(dataArray);
+ fbo.setData(dataArray);
m_framebuffers.append(fbo);
}
}
diff --git a/gui/imageviewer.cpp b/gui/imageviewer.cpp
index 4f47bc02..6953c009 100644
--- a/gui/imageviewer.cpp
+++ b/gui/imageviewer.cpp
@@ -61,10 +61,10 @@ ImageViewer::~ImageViewer()
delete m_image;
}
-void ImageViewer::setBase64Data(const QByteArray &base64)
+void ImageViewer::setData(const QByteArray &data)
{
delete m_image;
- m_image = ApiSurface::imageFromBase64(base64);
+ m_image = ApiSurface::imageFromData(data);
m_convertedImage = ApiSurface::qimageFromRawImage(m_image);
m_pixelWidget->setSurface(m_convertedImage);
updateGeometry();
diff --git a/gui/imageviewer.h b/gui/imageviewer.h
index daf5baed..7cb2eb52 100644
--- a/gui/imageviewer.h
+++ b/gui/imageviewer.h
@@ -17,7 +17,7 @@ public:
ImageViewer(QWidget *parent = 0);
~ImageViewer();
- void setBase64Data(const QByteArray &base64);
+ void setData(const QByteArray &data);
QSize sizeHint() const;
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 80d3ba29..17c2afaa 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -763,7 +763,7 @@ static void addSurfaceItem(const ApiSurface &surface,
l->setWordWrap(true);
tree->setItemWidget(item, 1, l);
- item->setData(0, Qt::UserRole, surface.base64Data());
+ item->setData(0, Qt::UserRole, surface.data());
}
void MainWindow::fillStateForFrame()
@@ -918,8 +918,8 @@ void MainWindow::showSelectedSurface()
viewer->setAttribute(Qt::WA_DeleteOnClose, true);
- QByteArray base64Data = var.value<QByteArray>();
- viewer->setBase64Data(base64Data);
+ QByteArray data = var.value<QByteArray>();
+ viewer->setData(data);
viewer->show();
viewer->raise();
@@ -1493,7 +1493,7 @@ void MainWindow::saveSelectedSurface()
QImage img = var.value<QImage>();
if (img.isNull()) {
- image::Image *traceImage = ApiSurface::imageFromBase64(var.value<QByteArray>());
+ image::Image *traceImage = ApiSurface::imageFromData(var.value<QByteArray>());
img = ApiSurface::qimageFromRawImage(traceImage);
delete traceImage;
}