16 #include <QFileDialog>
17 #include <QCloseEvent>
31 QObject::connect(AnalysisSaveConf, SIGNAL(clicked()),
this, SLOT(
SaveConfiguration()));
33 QObject::connect(LoadAutoSaveFileName, SIGNAL(clicked()),
this, SLOT(
FileDialog_AutoSave()));
34 QObject::connect(AutoSaveFileName, SIGNAL(textChanged(QString)),
this, SLOT(
LineEdit_AutoSaveFile()));
36 QObject::connect(CompLevel, SIGNAL(valueChanged(
int)),
this, SLOT(
SetCompressionLevel(
int)));
37 QObject::connect(AnalysisLoadConf, SIGNAL(clicked()),
this, SLOT(
LoadConfiguration()));
38 QObject::connect(AutoSaveInterval, SIGNAL(valueChanged(
int)),
this, SLOT(
SetAutoSaveInterval(
int)));
39 QObject::connect(AutoSaveOverwrite, SIGNAL(toggled(
bool)),
this, SLOT(
SetAutoSaveOverwrite(
bool)));
40 QObject::connect(SaveNowB, SIGNAL(clicked()),
this, SLOT(
WriteAutoSave()));
41 QObject::connect(AutoSaveEnable, SIGNAL(toggled(
bool)),
this, SLOT(
EnableAutoSaveSlot(
bool)));
42 QObject::connect(SubmitAndStartButton, SIGNAL(clicked()),
this, SLOT(
SubmitAndStart()));
43 QObject::connect(ClosePushButton, SIGNAL(clicked()),
this, SLOT(
CloseAnalysis()));
71 if (strcmp(linkname,
"Status")==0) {
72 parentWidget()->raise();
73 parentWidget()->show();
74 if (parentWidget()->isMinimized()) parentWidget()->showNormal();
110 w = TabSteps->currentWidget();
112 TabSteps->removeTab(TabSteps->indexOf(w));
125 if ((status==0) || (anal==0))
return;
134 w = TabSteps->currentWidget();
136 TabSteps->removeTab(TabSteps->indexOf(w));
143 if (stepstatus==0)
continue;
144 QString StepName = stepstatus->GetName();
147 TabSteps->insertTab(i, NewStep, NewStep->
GetTabTitle());
150 TabSteps->setCurrentIndex(0);
151 TabSteps->adjustSize();
161 parentWidget()->showNormal();
162 parentWidget()->adjustSize();
205 "Select a configuration file",
207 " Configuration file (*.root)");
208 fd.setFileMode( QFileDialog::AnyFile);
209 if (fd.exec() != QDialog::Accepted)
return;
210 QStringList flst = fd.selectedFiles();
211 QString fileName = flst.isEmpty() ? QString() : flst[0];
213 if(!fileName.endsWith(
".root")) fileName.append(
".root");
214 ConfigFileName->setText(fileName);
219 QFileDialog fd(
this,
220 "Select file name for autosaving",
222 "Auto Save File (*.root)");
223 fd.setFileMode(QFileDialog::AnyFile);
224 fd.setAcceptMode(QFileDialog::AcceptSave);
225 if (fd.exec() != QDialog::Accepted)
return;
227 QStringList flst = fd.selectedFiles();
228 if (flst.isEmpty())
return;
230 QString fileName = flst[0];
232 if(!fileName.endsWith(
".root")) fileName.append(
".root");
233 AutoSaveFileName->setText(fileName);
239 QString fname = AutoSaveFileName->text().trimmed();
256 QString fname = ConfigFileName->text().trimmed();
266 QString fname = ConfigFileName->text().trimmed();
281 parentWidget()->hide();
312 if ((anal!=0) && (status!=0))
324 AutoSaveInterval->setEnabled(enabled);
329 return TabSteps->count();
334 if ((n<0) || (n>=TabSteps->count()))
return 0;
354 AutoSaveFileName->setText(filename);
355 AutoSaveInterval->setValue(interval);
356 CompLevel->setValue(compression);
358 AutoSaveOverwrite->setChecked(overwrite);
359 AutoSaveEnable->setChecked(enabled);
361 AutoSaveInterval->setEnabled(enabled);
370 filename = AutoSaveFileName->text();
371 interval = AutoSaveInterval->value();
372 compression = CompLevel->value();
374 overwrite = AutoSaveOverwrite->isChecked();
375 enabled = AutoSaveEnable->isChecked();
380 ConfigFileName->setText(filename);
385 filename = ConfigFileName->text();
390 ServiceCall(
"DisplayMbsMonitor", (
void*) mbsname.toLatin1().constData());
396 QWidget* mdi = parentWidget();
virtual void WriteAutoSave(const char *fname, Int_t complevel, Bool_t overwrite)
void SetAutoFileName(const char *name)
virtual void FileDialog_AutoSave()
virtual bool IsAcceptDrag(const char *itemname, TClass *cl, int kind)
virtual void SetStepStatus(TGo4AnalysisConfiguration *panel, TGo4AnalysisStepStatus *StepStatus, int number=-1)
Int_t GetAutoSaveCompression() const
virtual void GetAnalysisConfigFile(QString &filename)
virtual void WriteAutoSave()
virtual void SaveConfigFile(const char *fname)
virtual QString GetTabTitle()
const char * GetConfigFileName() const
virtual void SetAutoSaveConfig(QString filename, int interval, int compression, bool enbaled, bool overwrite)
void SetAutoSaveOn(Bool_t on=kTRUE)
TGo4ConfigStep * GetStepConfig(int n)
virtual void SetSourcePath(const QString &v)
virtual void SetAutoSaveOverwrite(bool overwrite)
virtual void linkedObjectRemoved(const char *linkname)
virtual void SetAutoSaveInterval(int t)
virtual Bool_t RefreshNamesList()
virtual void RequestAnalysisSettings()
virtual void RequestAnalysisStatus()
virtual void SaveConfiguration()
const char * GetAutoFileName() const
Int_t IsAutoSaveOverwrite() const
virtual void GetAutoSaveConfig(QString &filename, int &interval, int &compression, bool &enbaled, bool &overwrite)
TGo4Slot * SettingsSlot()
virtual void LoadConfiguration()
virtual void LineEdit_AutoSaveFile()
virtual QString GetStepName()
Int_t IsAutoSaveOn() const
virtual void RefreshWidget()
virtual void SubmitAndStart()
TGo4AnalysisStepStatus * GetStepStatus(const char *name)
virtual QString GetSourcePath()
virtual Bool_t CanSubmitObjects()
virtual void SetCompressionLevel(int t)
virtual void FileDialog_ConfFile()
virtual QString GetStorePath()
virtual void closeEvent(QCloseEvent *e)
TGo4AnalysisConfiguration(QWidget *parent=0, const char *name=0)
virtual void ResetWidget()
virtual void CloseAnalysis()
virtual void DropItem(const char *itemname, TClass *cl, int kind)
void SetAutoSaveOverwrite(Bool_t over=kTRUE)
TGo4ConfigStep * FindStepConfig(QString name)
virtual void SetStorePath(const QString &v)
virtual void EnableAutoSaveSlot(bool disabled)
virtual void WorkWithAnalysis(TGo4ServerProxy *anal)
virtual void SubmitConfiguration()
virtual void DisplayMbsMonitor(const QString &mbsname)
void SetAutoSaveInterval(Int_t i)
virtual void linkedObjectUpdated(const char *linkname, TObject *obj)
virtual void SetAnalysisConfigFile(QString filename)
void ChangeTabTitle(TGo4ConfigStep *step, int number)
void SetAutoSaveCompression(Int_t i=5)
Int_t GetAutoSaveInterval() const
virtual void LoadConfigFile(const char *fname)