GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QFitOutputActionWidget.cpp
Go to the documentation of this file.
1 // $Id: QFitOutputActionWidget.cpp 3114 2021-03-30 06:39:32Z 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 fuer 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 "TGo4FitterOutput.h"
17 
18 QFitOutputActionWidget::QFitOutputActionWidget(QWidget *parent, const char* name)
19  : QFitNamedWidget(parent, name)
20 {
21  setupUi(this);
22  QObject::connect(OptionsEdit, SIGNAL(textChanged(QString)), this, SLOT(OptionsEdit_textChanged(QString)));
23  QObject::connect(CommandCombo, SIGNAL(activated(int)), this, SLOT(CommandCombo_activated(int)));
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:63
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:51
virtual void FillSpecificData()