GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4BrowserOptions.cpp
Go to the documentation of this file.
1 // $Id: TGo4BrowserOptions.cpp 1692 2015-07-09 15:56:55Z 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 "TGo4BrowserOptions.h"
15 
16 #include "TGo4BrowserProxy.h"
17 #include "TGo4ServerProxy.h"
18 #include "TGo4AnalysisProxy.h"
19 #include "TGo4DabcProxy.h"
20 #include "TGo4HttpProxy.h"
21 
22 TGo4BrowserOptions::TGo4BrowserOptions(QWidget *parent, const char* name) :
23  QGo4Widget(parent,name)
24 {
25  setupUi(this);
26 }
27 
29 {
30  AddLink("","Browser");
31  UpdateView();
32 }
33 
35 {
36  int interval = Browser()->MonitoringPeriod()/1000;
37  StartMonitorBtn->setEnabled(interval<=0);
38  StopMonitorBtn->setEnabled(interval>0);
39 
40  if ((interval>1) && (IntervalSpin->value()!=interval))
41  IntervalSpin->setValue(interval);
42 }
43 
44 void TGo4BrowserOptions::linkedObjectUpdated(const char* linkname, TObject* obj)
45 {
46  if (strcmp(linkname,"Browser")==0)
47  UpdateView();
48 }
49 
51 {
53  if (an!=0) an->RefreshNamesList();
54 
55  TObjArray prlist;
56  Browser()->MakeDabcList(&prlist);
57  for(Int_t n=0;n<=prlist.GetLast();n++) {
58  TGo4DabcProxy* pr = dynamic_cast<TGo4DabcProxy*> (prlist.At(n));
59  if (pr) pr->RefreshNamesList();
60  }
61 
62  prlist.Clear();
63  Browser()->MakeHttpList(&prlist);
64  for(Int_t n=0;n<=prlist.GetLast();n++) {
65  TGo4HttpProxy* pr = dynamic_cast<TGo4HttpProxy*> (prlist.At(n));
66  if (pr) pr->RefreshNamesList();
67  }
68 
70 }
71 
73 {
75  if (an) {
77  } else {
78  TGo4ServerProxy* root_serv = Browser()->FindServer(0, kFALSE);
79  if (root_serv) {
80  TString cmd = root_serv->FindCommand("Clear");
81  if (cmd.Length()>0) root_serv->SubmitCommand(cmd);
82  }
83  }
85 }
86 
87 
89 {
90  int period = IntervalSpin->value();
91 
92  Browser()->ToggleMonitoring(period*1000);
93 
94  UpdateView();
95 }
96 
98 {
100 
101  UpdateView();
102 }
103 
105 {
106  Browser()->SetItemsFilter(indx);
107 }
108 
virtual void StopMonitorBtn_clicked()
void MakeHttpList(TObjArray *arr)
virtual void ClearBtn_clicked()
virtual void FilterBox_activated(int indx)
Int_t UpdateVisibleAnalysisObjects(bool checkmonitor)
virtual void StartMonitorBtn_clicked()
virtual Bool_t RefreshNamesList()
virtual void UpdateView()
TGo4ServerProxy * FindServer(const char *itemname=0, Bool_t asanalysis=kTRUE)
TGo4BrowserProxy * Browser()
Definition: QGo4Widget.cpp:223
TGo4BrowserOptions(QWidget *parent=0, const char *name=0)
virtual Bool_t RefreshNamesList()
virtual void linkedObjectUpdated(const char *linkname, TObject *obj)
void MakeDabcList(TObjArray *arr)
virtual void RefreshBtn_clicked()
virtual void ClearAllAnalysisObjects()
virtual Bool_t RefreshNamesList()
void AddLink(const char *itemname, const char *linkname)
Definition: QGo4Widget.cpp:121
virtual TString FindCommand(const char *name)
virtual Bool_t SubmitCommand(const char *name, Int_t waitres=-1, const char *arg1=0, const char *arg2=0, const char *arg3=0)
void SetItemsFilter(Int_t filter)
virtual void StartWorking()
Int_t MonitoringPeriod() const
void ToggleMonitoring(Int_t period)