Screenshots: Optimize image loading and memory use, fix list and button layout.

This commit is contained in:
Petr Mrázek
2014-02-25 01:21:46 +01:00
parent cb5cfe7242
commit 9d4e840a6e
5 changed files with 38 additions and 15 deletions

View File

@ -0,0 +1,14 @@
#include "Screenshot.h"
#include <QImage>
#include <QIcon>
QIcon ScreenShot::getImage()
{
if(!imageloaded)
{
QImage image(file);
QImage thumbnail = image.scaledToWidth(256, Qt::SmoothTransformation);
m_image = QIcon(QPixmap::fromImage(thumbnail));
imageloaded = true;
}
return m_image;
}