summaryrefslogtreecommitdiffstats
path: root/logic/screenshots/Screenshot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/screenshots/Screenshot.cpp')
-rw-r--r--logic/screenshots/Screenshot.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/logic/screenshots/Screenshot.cpp b/logic/screenshots/Screenshot.cpp
new file mode 100644
index 00000000..882e491f
--- /dev/null
+++ b/logic/screenshots/Screenshot.cpp
@@ -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;
+}