00001 // $Id: TGo4BrowserOptions.cpp 1026 2013-11-01 14:47:36Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #include "TGo4BrowserOptions.h" 00015 00016 #include "TGo4BrowserProxy.h" 00017 #include "TGo4AnalysisProxy.h" 00018 #include "TGo4DabcProxy.h" 00019 00020 TGo4BrowserOptions::TGo4BrowserOptions(QWidget *parent, const char* name) 00021 : QGo4Widget(parent,name) 00022 { 00023 setupUi(this); 00024 } 00025 00026 void TGo4BrowserOptions::StartWorking() 00027 { 00028 AddLink("","Browser"); 00029 UpdateView(); 00030 } 00031 00032 void TGo4BrowserOptions::UpdateView() 00033 { 00034 int interval = Browser()->MonitoringPeriod()/1000; 00035 StartMonitorBtn->setEnabled(interval<=0); 00036 StopMonitorBtn->setEnabled(interval>0); 00037 00038 if ((interval>1) && (IntervalSpin->value()!=interval)) 00039 IntervalSpin->setValue(interval); 00040 } 00041 00042 void TGo4BrowserOptions::linkedObjectUpdated(const char* linkname, TObject* obj) 00043 { 00044 if (strcmp(linkname,"Browser")==0) 00045 UpdateView(); 00046 } 00047 00048 void TGo4BrowserOptions::RefreshBtn_clicked() 00049 { 00050 TGo4AnalysisProxy* an = Browser()->FindAnalysis(); 00051 if (an!=0) an->RefreshNamesList(); 00052 00053 TObjArray prlist; 00054 Browser()->MakeDabcList(&prlist); 00055 for(Int_t n=0;n<=prlist.GetLast();n++) { 00056 TGo4DabcProxy* pr = (TGo4DabcProxy*) prlist.At(n); 00057 if (pr) pr->RefreshNamesList(); 00058 } 00059 00060 Browser()->UpdateVisibleAnalysisObjects(false); 00061 } 00062 00063 void TGo4BrowserOptions::ClearBtn_clicked() 00064 { 00065 TGo4AnalysisProxy* an = Browser()->FindAnalysis(); 00066 if (an) { 00067 an->ClearAnalysisObject("Histograms"); 00068 an->ClearAnalysisObject("Conditions"); 00069 } 00070 Browser()->UpdateVisibleAnalysisObjects(false); 00071 } 00072 00073 00074 void TGo4BrowserOptions::StartMonitorBtn_clicked() 00075 { 00076 int period = IntervalSpin->value(); 00077 00078 Browser()->ToggleMonitoring(period*1000); 00079 00080 UpdateView(); 00081 } 00082 00083 void TGo4BrowserOptions::StopMonitorBtn_clicked() 00084 { 00085 Browser()->ToggleMonitoring(0); 00086 00087 UpdateView(); 00088 } 00089 00090 void TGo4BrowserOptions::FilterBox_activated(int indx) 00091 { 00092 Browser()->SetItemsFilter(indx); 00093 } 00094