// Copyright 2007 Nanorex, Inc. See LICENSE file for details.
#include "ResultsSummaryWindow.h"
/* CONSTRUCTOR */
ResultsSummaryWindow::ResultsSummaryWindow(const QString& filename,
NXDataStoreInfo* dataStoreInfo,
QWidget *parent)
: DataWindow(parent), Ui_ResultsSummaryWindow() {
this->dataStoreInfo = dataStoreInfo;
setupUi(this);
QString title = tr("Results Summary - %1").arg(filename);
setWindowTitle(title);
setWindowFlags(Qt::Dialog | Qt::Tool);
printSummary();
}
/* DESTRUCTOR */
ResultsSummaryWindow::~ResultsSummaryWindow() {
}
/* FUNCTION: refresh */
void ResultsSummaryWindow::refresh() {
printSummary();
}
/* FUNCTION: printSummary */
void ResultsSummaryWindow::printSummary() {
NXProperties* properties = dataStoreInfo->getResultsSummary();
if (properties == NULL) {
textEdit->insertHtml(tr("Results Summary
No results summary found."));
} else {
QString html =
QString("Results Summary
%1: | %2 %3