Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "QFitTableWidget.h"
00015
00016 #include "Riostream.h"
00017
00018 #include "QFitItem.h"
00019 #include "TGo4Fitter.h"
00020 #include "TGo4FitGuiTypes.h"
00021
00022
00023 QFitTableWidget::QFitTableWidget(QWidget *parent, const char* name)
00024 : QFitWidget(parent, name)
00025 {
00026 setupUi(this);
00027 }
00028
00029 void QFitTableWidget::FillSpecificData()
00030 {
00031 Table->setColumnCount(0);
00032 Table->setRowCount(0);
00033 Table->setEnabled(false);
00034 if (GetItem())
00035 if (GetItem()->ObjectType()==FitGui::ot_results) {
00036 TGo4Fitter* fitter = dynamic_cast<TGo4Fitter*> (GetObject());
00037 if (fitter==0) return;
00038 Table->setColumnCount(1);
00039 Table->setHorizontalHeaderItem(0, new QTableWidgetItem("Value"));
00040 Table->setColumnWidth(0,150);
00041 Table->setRowCount(fitter->GetNumResults()+2);
00042 Table->setVerticalHeaderItem(0, new QTableWidgetItem("Fit function"));
00043 Table->setItem(0,0, new QTableWidgetItem(QString::number(fitter->GetResultFF())));
00044 Table->setVerticalHeaderItem(1, new QTableWidgetItem("NDF"));
00045 Table->setItem(1,0, new QTableWidgetItem(QString::number(fitter->GetResultNDF())));
00046
00047 for (Int_t n=0;n<fitter->GetNumResults();n++) {
00048 Table->setVerticalHeaderItem(n+2, new QTableWidgetItem(QString("Result") + QString::number(n)));
00049 Table->setItem(n+2, 0, new QTableWidgetItem(QString::number(fitter->GetResultValue(n))));
00050 }
00051 }
00052 }