From: Steinar H. Gunderson Date: Tue, 9 May 2017 20:07:30 +0000 (+0200) Subject: Make the sublabel under the grabbed frame a bit more dynamic. X-Git-Tag: 1.6.0~32 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b621e521934002462061b80ccf3b83867497abb6;p=nageru Make the sublabel under the grabbed frame a bit more dynamic. --- diff --git a/analyzer.cpp b/analyzer.cpp index 08de86f..578d17a 100644 --- a/analyzer.cpp +++ b/analyzer.cpp @@ -61,7 +61,7 @@ Analyzer::~Analyzer() resource_pool->clean_context(); } delete_context(context); - delete surface; // TODO? + delete surface; } void Analyzer::grab_clicked() @@ -115,6 +115,12 @@ void Analyzer::grab_clicked() memcpy(grabbed_image.scanLine(global_flags.height - y - 1), buf + y * pitch, pitch); } + { + char buf[256]; + snprintf(buf, sizeof(buf), "Grabbed frame (%dx%d)", global_flags.width, global_flags.height); + ui->grabbed_frame_sublabel->setText(buf); + } + QPixmap pixmap; pixmap.convertFromImage(grabbed_image); ui->grabbed_frame_label->setPixmap(pixmap); diff --git a/ui_analyzer.ui b/ui_analyzer.ui index ad50d35..3685a38 100644 --- a/ui_analyzer.ui +++ b/ui_analyzer.ui @@ -97,7 +97,7 @@ Qt::AlignCenter - + 350 @@ -107,7 +107,7 @@ - Grabbed frame (1280x720) + Grabbed frame Qt::AlignCenter