GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitOutputActionWidget.cpp
Go to the documentation of this file.
1 // $Id: QFitOutputActionWidget.cpp 1134 2014-01-22 14:53:40Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "QFitOutputActionWidget.h"
15 
16 #include "QFitItem.h"
17 #include "TGo4FitterOutput.h"
18 
19 QFitOutputActionWidget::QFitOutputActionWidget(QWidget *parent, const char* name)
20  : QFitNamedWidget(parent, name)
21 {
22  setupUi(this);
23 }
24 
25 
27 {
28  return dynamic_cast<TGo4FitterOutput*> (GetObject());
29 }
30 
32 {
34  if (GetOutAct()) {
35  if (QString("Draw")==GetOutAct()->GetCommand()) CommandCombo->setCurrentIndex(4);
36  else CommandCombo->setCurrentIndex(0);
37  OptionsEdit->setText(GetOutAct()->GetOptions());
38  }
39 }
40 
42 {
43  if(!fbFillWidget && GetOutAct())
44  GetOutAct()->SetOptions(str.toLatin1().constData());
45 }
46 
48 {
49  if(!fbFillWidget && GetOutAct()) {
50  if (n==4) GetOutAct()->SetCommand("Draw");
51  else GetOutAct()->SetCommand("Print");
52  ChangeName(QString(GetOutAct()->GetCommand()));
53  switch (n) {
54  case 1: OptionsEdit->setText("Pars"); break;
55  case 2: OptionsEdit->setText("Ampls"); break;
56  case 3: OptionsEdit->setText("Results"); break;
57  }
58  OptionsEdit->setEnabled((n==0) || (n==4));
59  }
60 }
virtual void CommandCombo_activated(int)
void SetOptions(const char *Options)
virtual void ChangeName(const QString &name)
bool fbFillWidget
Definition: QFitWidget.h:64
QFitOutputActionWidget(QWidget *parent=0, const char *name=0)
virtual TGo4FitterOutput * GetOutAct()
void SetCommand(const char *Command)
virtual void OptionsEdit_textChanged(const QString &str)
virtual TObject * GetObject()
Definition: QFitWidget.cpp:53
virtual void FillSpecificData()