16 #include <QMessageBox>
44 if (cl==0)
return false;
46 return cl->InheritsFrom(TGo4DynamicEntry::Class()) ||
47 cl->InheritsFrom(TH1::Class()) ||
48 cl->InheritsFrom(TTree::Class()) ||
49 cl->InheritsFrom(TGo4Condition::Class());
56 if (cl->InheritsFrom(TGo4DynamicEntry::Class()))
59 if (cl->InheritsFrom(TH1::Class()))
62 if (cl->InheritsFrom(TGo4Condition::Class()))
65 if (cl->InheritsFrom(TTree::Class()))
71 if (strcmp(linkname,
"Entry")==0)
84 if ((entry==0) || (br==0))
return;
90 EntryBox->setTitle(QString(
"Entry: ") + entry->ClassName());
93 EntryBox->setEnabled(
true);
94 HistogramBox->setEnabled(
true);
95 EntryTabs->setEnabled(
true);
105 EntryTabs->setTabEnabled(EntryTabs->indexOf(EventTab),
true);
106 EntryTabs->setTabEnabled(EntryTabs->indexOf(ConditionTab),
true);
107 EntryTabs->setTabEnabled(EntryTabs->indexOf(TreeTab),
false);
108 EntryTabs->setCurrentIndex(EntryTabs->indexOf(EventTab));
114 HistoNameLbl->setText(hitemname.Data());
115 DrawButton->setVisible(hitemname.Length()>0);
116 ClearButton->setVisible(hitemname.Length()>0);
119 if (fname.length()>0) fname +=
"/";
121 EvXnameEdit->setText(fname);
124 if (fname.length()>0) fname +=
"/";
126 EvYnameEdit->setText(fname);
129 if (fname.length()>0) fname +=
"/";
131 EvZnameEdit->setText(fname);
137 CondNameLbl->setText(citemname.Data());
140 if (fname.length()>0) fname +=
"/";
142 ConXnameEdit->setText(fname);
145 if (fname.length()>0) fname +=
"/";
147 ConYnameEdit->setText(fname);
152 EntryTabs->setTabEnabled(EntryTabs->indexOf(EventTab),
false);
153 EntryTabs->setTabEnabled(EntryTabs->indexOf(ConditionTab),
false);
154 EntryTabs->setTabEnabled(EntryTabs->indexOf(TreeTab),
true);
155 EntryTabs->setCurrentIndex(EntryTabs->indexOf(TreeTab));
161 HistoNameLbl->setText(hitemname.Data());
162 DrawButton->setVisible(hitemname.Length()>0);
163 ClearButton->setVisible(hitemname.Length()>0);
169 TreeNameLbl->setText(titemname.Data());
171 DrawExprEdit->setText(tentry->
GetVarExp());
172 CutExprEdit->setText(tentry->
GetCutExp());
181 TString folder, name;
187 return QString(folder.Data());
192 TString folder, name;
194 return QString(name.Data());
203 if ((entry!=0) && (oldname!=0) && PleaseUpdateLabel->isVisible()) {
205 int res = QMessageBox::warning(
this,
"Dynamic list entry editor",
206 QString(
"Current entry ")+oldname+
" is modified!\n New entry" +
207 itemname+
" selected.",
208 QString(
"Continue with current"),
209 QString(
"Start with new"), QString::null, 0);
219 EntryNameLbl->setText(itemname);
221 QString iconname =
":/icons/right.png";
222 QString tooltip =
"Refresh dynamic entry from analysis";
224 iconname =
":/icons/refresh.png";
225 tooltip =
"Refresh dynamic entry from source";
227 RefreshButton->setIcon( QIcon(iconname) );
228 RefreshButton->setToolTip(tooltip);
234 parentWidget()->adjustSize();
235 parentWidget()->setFocus();
240 if (itemname==0)
return;
244 HistoNameLbl->setText(itemname);
245 DrawButton->setVisible(
true);
246 ClearButton->setVisible(
true);
265 CondNameLbl->setText(itemname);
267 EntryTabs->setCurrentIndex(EntryTabs->indexOf(ConditionTab));
280 TreeNameLbl->setText(itemname);
294 EntryNameLbl->setText(
"");
295 EntryBox->setTitle(QString(
"Entry: "));
297 EntryBox->setEnabled(
false);
298 HistogramBox->setEnabled(
false);
299 EntryTabs->setEnabled(
false);
301 DrawButton->setVisible(
false);
303 RefreshButton->setIcon( QIcon(
":/icons/right.png" ) );
326 PleaseUpdateLabel->setVisible(on);
334 if(!PleaseUpdateLabel->isVisible())
383 if ((edt==0) || (
Browser()==0))
return;
385 QString value = edt->text();
395 QString serachfor(
"EventObjects/Events/");
396 int pos = value.indexOf(serachfor);
402 value.remove(0, pos+serachfor.length());
409 if ((edt==0) || (
Browser()==0))
return;
411 QString value = edt->text();
417 int kind = br->
ItemKind(value.toLatin1().constData());
427 TString lfolder, lname;
429 edt->setText(lname.Data());
457 if (cl->InheritsFrom(TH1::Class()))
460 if (cl->InheritsFrom(TGo4Condition::Class()))
469 if (entry==0)
return false;
475 TString folder, name;
487 TString folder, name;
571 tentry->
SetVarExp(value.toLatin1().constData());
579 tentry->
SetCutExp(value.toLatin1().constData());
602 if (dynamic_cast<TGo4TreeHistogramEntry*>(
GetLinked(
"Entry",0))!=0)
virtual void EvXnameEdit_textChanged(const QString &xname)
virtual QString GetEventName(const QString &itemname)
virtual void PrintDynList()
virtual void ResetWidget()
virtual void WorkWithEntry(const char *itemname)
virtual void ConInfoButton_clicked()
TObject * GetBrowserObject(const char *name, Int_t update=0)
virtual void requestedObjectCreated(const char *itemname, TClass *cl)
virtual void EvZnameEdit_textChanged(const QString &zname)
Int_t ItemKind(const char *name)
void SetCutExp(const char *cut)
virtual void DropItem(const char *itemname, TClass *cl, int kind)
void SetConditionName(const char *name)
void SetDynListInterval(Int_t value)
virtual void DynIntervalSpin_valueChanged(int value)
void SetTreeName(const char *name)
virtual void EvZnameEdit_dropped()
void SetConEventName(Int_t ix, const char *name)
const char * GetConVarName(Int_t ix) const
virtual bool PrepareEntryForAnalysis()
void SetHistogramName(const char *name)
virtual void DrawExprEdit_textChanged(const QString &value)
virtual void ProcessTreeDropEvent(QGo4LineEdit *edt)
virtual void CutExprEdit_dropped()
virtual void ClearAnalysisObject(const char *fullpath)
const char * GetHistogramName() const
virtual void RefreshClicked()
virtual void SetPleaseUpdate(bool on)
virtual void ApplyClicked()
virtual void EvXnameEdit_dropped()
virtual void PrintDynListEntry(const char *fullpath)
virtual void ExecuteLine(const char *line)
virtual void DropTree(const char *itemname)
virtual void HisCreateButton_clicked()
virtual void ConYnameEdit_textChanged(const QString &yname)
virtual void EvYnameEdit_textChanged(const QString &yname)
virtual void SaveEntrySlot()
virtual void DropHistogram(const char *itemname)
void SetHistogramName(const char *name)
virtual void DropCondition(const char *itemname)
const char * GetHistVarName(Int_t ix) const
const char * GetCutExp() const
TGo4EditDynEntry(QWidget *parent=0, const char *name=0)
void SetHisEventName(Int_t ix, const char *name)
Bool_t IsEnabledProcessing() const
virtual bool IsAcceptDrag(const char *itemname, TClass *cl, int kind)
Bool_t DefineRelatedObject(const char *itemname, const char *objectname, TString &objectitem, Int_t mask=3)
virtual void ProcessDropEvent(QGo4LineEdit *edt)
virtual void EntryEnabledButton_toggled(bool on)
const char * GetTreeName() const
const char * GetHistogramName() const
virtual void linkedObjectUpdated(const char *linkname, TObject *obj)
virtual void ConRemoveButton_clicked()
Bool_t DefineTreeName(const char *itemname, TString &treename)
virtual void ConNewButton_clicked()
virtual void ConXnameEdit_dropped()
static void ProduceFolderAndName(const char *fullname, TString &foldername, TString &objectname)
void EnableProcessing(Bool_t on=kTRUE)
virtual void ClearHistogramClicked()
const char * GetVarExp() const
const char * GetConditionName() const
void SetConVarName(Int_t ix, const char *name)
virtual void RefreshWidget()
virtual void EvYnameEdit_dropped()
virtual QString GetEventMember(const QString &itemname)
const char * GetConEventName(Int_t ix) const
TGo4ServerProxy * DefineAnalysisObject(const char *itemname, TString &analysisname)
virtual void DrawButton_clicked()
const char * GetHistEventName(Int_t ix) const
virtual void HisInfoButton_clicked()
virtual void DrawExprEdit_dropped()
void SetVarExp(const char *exp)
virtual void ConXnameEdit_textChanged(const QString &xname)
virtual void ConYnameEdit_dropped()
Int_t GetDynListInterval() const
virtual void CutExprEdit_textChanged(const QString &value)
void SetHisVarName(Int_t ix, const char *name)
virtual void EntryChangedSlot()