From 314ca30f928a1e1cfc6813f68d6659e9e4c0aa2a Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Mon, 2 Nov 2015 17:50:44 +0100 Subject: [PATCH] [TASK] Move analyze image output to label. --- imageviewer-qt4.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index 06e9d40..be71449 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -174,9 +174,11 @@ void ImageViewer::analyzeImage() { } logFile << "done" << std::endl; - logFile << "Average intensity: " << getAverageIntensity() << std::endl; - logFile << "Intensity variance: " << getIntensityVariance() << std::endl; renewLogging(); + + QString result = QString("Intensity - average : %1, variance: %2").arg(getAverageIntensity()).arg(getIntensityVariance()); + task_tab2_stats->setText(result); + updateHistogramm(); } } @@ -298,7 +300,8 @@ void ImageViewer::generateControlPanels() { histogrammLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); histogrammLabel->setScaledContents(false); - QLabel* task_tab2_stats = new QLabel(); + task_tab2_stats = new QLabel(); + task_tab2_stats->setText("Results will go here ..."); task_tab_widget2 = new QWidget(); task_tab2 = new QVBoxLayout();