GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
QFitOutputActionWidget.cpp
Go to the documentation of this file.
1// $Id$
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
15
16#include "TGo4FitterOutput.h"
17
18QFitOutputActionWidget::QFitOutputActionWidget(QWidget *parent, const char *name)
19 : QFitNamedWidget(parent, name)
20{
21 setupUi(this);
22 QObject::connect(OptionsEdit, &QGo4LineEdit::textChanged, this, &QFitOutputActionWidget::OptionsEdit_textChanged);
23 QObject::connect(CommandCombo, QOverload<int>::of(&QComboBox::activated), this, &QFitOutputActionWidget::CommandCombo_activated);
24}
25
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}
QFitNamedWidget(QWidget *parent=nullptr, const char *name=nullptr)
virtual void ChangeName(const QString &name)
void FillSpecificData() override
virtual void CommandCombo_activated(int)
QFitOutputActionWidget(QWidget *parent=nullptr, const char *name=nullptr)
virtual TGo4FitterOutput * GetOutAct()
virtual void OptionsEdit_textChanged(const QString &str)
virtual TObject * GetObject()
bool fbFillWidget
Definition QFitWidget.h:63
Output action.
void SetOptions(const char *Options)
Sets command options.
void SetCommand(const char *Command)
Sets command name.