00001 // $Id: QFitOutputActionWidget.cpp 1134 2014-01-22 14:53:40Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "QFitOutputActionWidget.h" 00015 00016 #include "QFitItem.h" 00017 #include "TGo4FitterOutput.h" 00018 00019 QFitOutputActionWidget::QFitOutputActionWidget(QWidget *parent, const char* name) 00020 : QFitNamedWidget(parent, name) 00021 { 00022 setupUi(this); 00023 } 00024 00025 00026 TGo4FitterOutput* QFitOutputActionWidget::GetOutAct() 00027 { 00028 return dynamic_cast<TGo4FitterOutput*> (GetObject()); 00029 } 00030 00031 void QFitOutputActionWidget::FillSpecificData() 00032 { 00033 QFitNamedWidget::FillSpecificData(); 00034 if (GetOutAct()) { 00035 if (QString("Draw")==GetOutAct()->GetCommand()) CommandCombo->setCurrentIndex(4); 00036 else CommandCombo->setCurrentIndex(0); 00037 OptionsEdit->setText(GetOutAct()->GetOptions()); 00038 } 00039 } 00040 00041 void QFitOutputActionWidget::OptionsEdit_textChanged( const QString & str) 00042 { 00043 if(!fbFillWidget && GetOutAct()) 00044 GetOutAct()->SetOptions(str.toLatin1().constData()); 00045 } 00046 00047 void QFitOutputActionWidget::CommandCombo_activated( int n) 00048 { 00049 if(!fbFillWidget && GetOutAct()) { 00050 if (n==4) GetOutAct()->SetCommand("Draw"); 00051 else GetOutAct()->SetCommand("Print"); 00052 ChangeName(QString(GetOutAct()->GetCommand())); 00053 switch (n) { 00054 case 1: OptionsEdit->setText("Pars"); break; 00055 case 2: OptionsEdit->setText("Ampls"); break; 00056 case 3: OptionsEdit->setText("Results"); break; 00057 } 00058 OptionsEdit->setEnabled((n==0) || (n==4)); 00059 } 00060 }