summaryrefslogtreecommitdiff
path: root/client/mainwindow.cc
diff options
context:
space:
mode:
authordeva <deva>2006-04-14 14:37:56 +0000
committerdeva <deva>2006-04-14 14:37:56 +0000
commite5dc1f42337228bf367ae8ea28469a8eef4861bd (patch)
tree136ebce809ea10b3531c92c36d890c068c536a18 /client/mainwindow.cc
parent6da7cc9bd16bb16f03bf0695b79cb41f9f23f58f (diff)
*** empty log message ***
Diffstat (limited to 'client/mainwindow.cc')
-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()