GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4CreateNewDynEntry.cpp
Go to the documentation of this file.
1 // $Id: TGo4CreateNewDynEntry.cpp 2761 2020-04-16 13:36:13Z 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 "TGo4CreateNewDynEntry.h"
15 
16 #include "TGo4TreeHistogramEntry.h"
17 #include "TGo4HistogramEntry.h"
18 
20  : QDialog( parent)
21 {
22  setObjectName("Go4CreateNewDynEntry");
23  setupUi(this);
24  setAcceptDrops(false);
25  EntryName->setText("entry");
26  EntryTitle->setText("Dynamic entry title");
27  EntryType->setCurrentIndex(0);
28 }
29 
31 {
32  TGo4DynamicEntry* entry = 0;
33 
34  if (EntryType->currentIndex()==0)
35  entry = new TGo4HistogramEntry();
36  else
37  if (EntryType->currentIndex()==1)
38  entry = new TGo4TreeHistogramEntry();
39 
40  if (entry!=0) {
41  entry->EnableProcessing(kFALSE);
42  entry->SetName(EntryName->text().toLatin1().constData());
43  entry->SetTitle(EntryTitle->text().toLatin1().constData());
44  }
45 
46  return entry;
47 }
TGo4DynamicEntry * MakeEntry()
TGo4CreateNewDynEntry(QWidget *parent=0)
void EnableProcessing(Bool_t on=kTRUE)