summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mainwindow.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 239e10f..49cd634 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -59,8 +59,9 @@ QPushButton *MainWindow::createButton(char* icon)
}
#include <QApplication>
-MainWindow::MainWindow(): QWidget()
+MainWindow::MainWindow(Decoder *d): QWidget()
{
+ decoder = d;
MIaV::info->log("Starting MIaV v. %s.", VERSION);
// Create the overlaying splashscreen
@@ -161,7 +162,17 @@ void MainWindow::record_clicked()
void MainWindow::snapshot_clicked()
{
MIaV::control.shoot();
- history->addHistoryItem(new HistoryWidget(new QPixmap(PIXMAP_LOGO_SMALL)));
+
+ char rgb[720 * 576 * 4];
+
+ QImage *screenshot = new QImage((uchar*)rgb, 720, 576, QImage::Format_RGB32);
+ decoder->snapshot(rgb);
+
+ QPixmap *p = new QPixmap();
+ *p = QPixmap::fromImage(*screenshot);
+ delete screenshot;
+
+ history->addHistoryItem(new HistoryWidget(p));
}
void MainWindow::freeze_clicked()