From e5dc1f42337228bf367ae8ea28469a8eef4861bd Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 14 Apr 2006 14:37:56 +0000 Subject: *** empty log message *** --- client/mainwindow.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'client') 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 -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() -- cgit v1.2.3