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