ATLAS Offline Software
VP1ExpertSettings.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Source file for class VP1ExpertSettings //
8 // //
9 // Description: Additional VP1 settings //
10 // //
11 // Author: Sebastian Andreas Merkt (sebastian.andreas.merkt@cern.ch) //
12 // Initial version: August 2017 //
13 // //
15 
17 #include "VP1Base/VP1QtUtils.h"
18 #include "VP1Base/VP1Msg.h"
19 
20 #include <QPushButton>
21 #include <QGridLayout>
22 #include <QLabel>
23 #include <QComboBox>
24 #include <QCheckBox>
25 #include <QDir>
26 #include <QKeyEvent>
27 
28 #if __GNUC__ >= 14
29 // suppress warning seen in qfutureinterface.h
30 # pragma GCC diagnostic push
31 # pragma GCC diagnostic ignored "-Wtemplate-id-cdtor"
32 #endif
33 #include <QtWidgets>
34 #if __GNUC__ >= 14
35 # pragma GCC diagnostic pop
36 #endif
37 
38 
39 template <typename... Args> inline void unused(Args&&...) {} // to declare variables as 'unused'
40 
41 
42 
44 {
45 
46  m_tabWidget = new QTabWidget;
47  GeneralTab *generalTab = new GeneralTab();
48  AdvancedTab *advancedTab = new AdvancedTab();
49  m_tabWidget->addTab(generalTab, tr("Settings"));
51 
52  #if defined BUILDVP1LIGHT
53  QString pluginPath=VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH");
54  QString fileSelectDir=VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_FILESELECTDIR");
55  QString screenshotDir=VP1QtUtils::expertSettingValue("general","ExpertSettings/VP1_SCREENSHOTS_DIR");
56  QString authLog=VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_AUTH_ENABLELOG");
57 
58  if(VP1QtUtils::expertSettingIsOn("general", "ExpertSettings/enableExpertSettings")){
59  m_tabWidget->addTab(advancedTab, tr("Advanced"));
63  }
64  #else
65  QString pluginPath=VP1QtUtils::environmentVariableValue("VP1PLUGINPATH");
66  QString fileSelectDir=VP1QtUtils::environmentVariableValue("VP1_FILESELECTDIR");
67  QString screenshotDir=VP1QtUtils::environmentVariableValue("VP1_SCREENSHOTS_DIR");
68  QString authLog=VP1QtUtils::environmentVariableValue("VP1_AUTH_ENABLELOG");
69 
70  // Always enable Advanced settings for VP1
71  m_tabWidget->addTab(advancedTab, tr("Advanced"));
75  #endif
76 
77  m_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
78 
79  connect(m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::close);
80  // connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
81 
82  QVBoxLayout *mainLayout = new QVBoxLayout;
83  mainLayout->addWidget(m_tabWidget);
84  mainLayout->addWidget(m_buttonBox);
85  setLayout(mainLayout);
86 
87  this->setWindowTitle(tr("VP1 Settings"));
88 
89 
90 }
91 
93 {
94  //Update settings
95  #if defined BUILDVP1LIGHT
96  VP1Msg::enableMsg("general", "ExpertSettings/VP1_VERBOSE_OUTPUT");
97  VP1Msg::enableMsg("general", "ExpertSettings/VP1_DEBUG_OUTPUT");
98  #else
99  VP1Msg::enableMsg("VP1_VERBOSE_OUTPUT");
100  VP1Msg::enableMsg("VP1_DEBUG_OUTPUT");
101  #endif
102 
103  // if(QDir(pluginPath).exists()||pluginPath==""){
104  #if defined BUILDVP1LIGHT
105  VP1QtUtils::setExpertSetting("expert","ExpertSettings/VP1PLUGINPATH", m_pluginPath);
106  VP1QtUtils::setExpertSetting("expert","ExpertSettings/VP1_FILESELECTDIR", m_fileSelectDir);
107  VP1QtUtils::setExpertSetting("expert","ExpertSettings/VP1_AUTH_ENABLELOG", m_authLog);
108  VP1QtUtils::setExpertSetting("general","ExpertSettings/VP1_SCREENSHOTS_DIR", m_screenshotDir);
109  #else
112  VP1QtUtils::setEnvironmentVariable("VP1_AUTH_ENABLELOG", m_authLog);
113  VP1QtUtils::setEnvironmentVariable("VP1_SCREENSHOTS_DIR", m_screenshotDir);
114  #endif
115 
116  #if defined BUILDVP1LIGHT
117  QMessageBox msgBox;
118  QCheckBox *cb = new QCheckBox("Don't ask again.");
119  msgBox.setWindowTitle("Settings");
120  msgBox.setText("Some settings may require a restart of VP1.");
121  msgBox.setIcon(QMessageBox::Icon::Information);
122  msgBox.setCheckBox(cb);
123 
124  if(VP1QtUtils::expertSettingIsOn("general","Configuration/enableCloseSettingsReminder")){
125  cb->setChecked(true);
126  }
127  connect(cb, &QCheckBox::toggled, [this](){VP1ExpertSettings::setExpertSetting("general","Configuration/enableCloseSettingsReminder");});
128 
129  if(cb->checkState()==Qt::Unchecked){
130  msgBox.exec();
131  }
132 
133  event->accept();
134  #else
135  unused(event);
136  #endif
137 
138 
139 }
140 
142  if(event->key() == Qt::Key_Escape)
143  VP1ExpertSettings::close();
144 }
145 
147  m_pluginPath = path;
148 }
149 
152 }
153 
156 }
157 
158 void VP1ExpertSettings::setAuthLog(const QString &path){
159  m_authLog = path;
160 }
161 
162 void VP1ExpertSettings::setExpertSetting(const QString &type, const QString &name){
165  } else {
167  }
168 }
169 
171  : QWidget(parent)
172 {
173 
174  QGroupBox *generalGroup = new QGroupBox(tr("General settings"));
175 
176  m_checkboxVerbose = new QCheckBox("&Verbose output", this);
177  m_checkboxVerbose->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
178  " <div style=\"width: 300px;\">Enable A LOT more verbose output to stdout from VP1. It is very useful if you run with this before sending us logfiles for bug reports.</div>"
179  " </html>", 0
180  ));
181  #if defined BUILDVP1LIGHT
182  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_VERBOSE_OUTPUT")){
183  m_checkboxVerbose->setChecked(true);
184  }
185  connect(m_checkboxVerbose, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_VERBOSE_OUTPUT");});
186  #else
187  if(VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")){
188  m_checkboxVerbose->setChecked(true);
189  }
190  connect(m_checkboxVerbose, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_VERBOSE_OUTPUT");});
191  #endif
192 
193  m_checkboxDebug = new QCheckBox("&Debug output", this);
194  m_checkboxDebug->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
195  " <div style=\"width: 300px;\">Enable A LOT more debug output to stdout from VP1. It is very useful if you run with this before sending us logfiles for bug reports.</div>"
196  " </html>", 0
197  ));
198  #if defined BUILDVP1LIGHT
199  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_DEBUG_OUTPUT")){
200  m_checkboxDebug->setChecked(true);
201  }
202  connect(m_checkboxDebug, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_DEBUG_OUTPUT");});
203  #else
204  if(VP1QtUtils::environmentVariableIsOn("VP1_DEBUG_OUTPUT")){
205  m_checkboxDebug->setChecked(true);
206  }
207  connect(m_checkboxDebug, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_DEBUG_OUTPUT");});
208  #endif
209 
210  m_checkboxDisallowMultipleChannels = new QCheckBox("D&isallow multiple channels", this);
211  m_checkboxDisallowMultipleChannels->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
212  " <div style=\"width: 300px;\">This variable exists to help users whose graphics drivers are broken in such a way as to make VP1 crash when showing multiple 3D widgets. Setting this variable will thus ensure that the user can only ever open one channel, and it will remove the little 3D preview window normally shown when editing a material.</div>"
213  " </html>", 0
214  ));
215  #if defined BUILDVP1LIGHT
216  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_DISALLOW_MULTIPLE_CHANNELS")){
217  m_checkboxDisallowMultipleChannels->setChecked(true);
218  }
219  connect(m_checkboxDisallowMultipleChannels, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_DISALLOW_MULTIPLE_CHANNELS");});
220  #else
221  if(VP1QtUtils::environmentVariableIsOn("VP1_DISALLOW_MULTIPLE_CHANNELS")){
222  m_checkboxDisallowMultipleChannels->setChecked(true);
223  }
224  connect(m_checkboxDisallowMultipleChannels, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_DISALLOW_MULTIPLE_CHANNELS");});
225  #endif
226 
227  m_checkboxDisplayMouseClicks = new QCheckBox("Dis&play mouse clicks", this);
228  m_checkboxDisplayMouseClicks->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
229  " <div style=\"width: 300px;\">Makes a small popup window appear whenever the user clicks a mouse-button in VP1. Basically this feature exists since it is used when producing the movies (screencasts) on this webpage.</div>"
230  " </html>", 0
231  ));
232  #if defined BUILDVP1LIGHT
233  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_DISPLAY_MOUSE_CLICKS")){
234  m_checkboxDisplayMouseClicks->setChecked(true);
235  }
236  connect(m_checkboxDisplayMouseClicks, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_DISPLAY_MOUSE_CLICKS");});
237  #else
238  if(VP1QtUtils::environmentVariableIsOn("VP1_DISPLAY_MOUSE_CLICKS")){
239  m_checkboxDisplayMouseClicks->setChecked(true);
240  }
241  connect(m_checkboxDisplayMouseClicks, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_DISPLAY_MOUSE_CLICKS");});
242  #endif
243 
244  m_checkboxEnableAskOnClose = new QCheckBox("&Ask on close", this);
245  m_checkboxEnableAskOnClose->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
246  " <div style=\"width: 300px;\">By default, closing the VP1 window immediately results in the job being finished. Setting this variable will instead make VP1 ask the user if it should really close.</div>"
247  " </html>", 0
248  ));
249  #if defined BUILDVP1LIGHT
250  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_ENABLE_ASK_ON_CLOSE")){
251  m_checkboxEnableAskOnClose->setChecked(true);
252  }
253  connect(m_checkboxEnableAskOnClose, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_ENABLE_ASK_ON_CLOSE");});
254  #else
255  if(VP1QtUtils::environmentVariableIsOn("VP1_ENABLE_ASK_ON_CLOSE")){
256  m_checkboxEnableAskOnClose->setChecked(true);
257  }
258  connect(m_checkboxEnableAskOnClose, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_ENABLE_ASK_ON_CLOSE");});
259  #endif
260 
261 
262  m_checkboxGuidesSphereInsteadOfCoordaxes = new QCheckBox("G&uides sphere instead of coordinate axes", this);
263  m_checkboxGuidesSphereInsteadOfCoordaxes->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
264  " <div style=\"width: 300px;\">Replaces the coordinate axes with a red sphere.</div>"
265  " </html>", 0
266  ));
267  #if defined BUILDVP1LIGHT
268  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_GUIDES_SPHERE_INSTEAD_OF_COORDAXES")){
270  }
271  connect(m_checkboxGuidesSphereInsteadOfCoordaxes, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_GUIDES_SPHERE_INSTEAD_OF_COORDAXES");});
272  #else
273  if(VP1QtUtils::environmentVariableIsOn("VP1_GUIDES_SPHERE_INSTEAD_OF_COORDAXES")){
275  }
276  connect(m_checkboxGuidesSphereInsteadOfCoordaxes, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_GUIDES_SPHERE_INSTEAD_OF_COORDAXES");});
277  #endif
278 
279 
280  m_checkboxAntiAliasing = new QCheckBox("Advanced Anti-Aliasing", this);
281  m_checkboxAntiAliasing->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
282  " <div style=\"width: 300px;\">Switches on advanced Anti-Aliasing. WARNING: May cause issues with certain graphics drivers.</div>"
283  " </html>", 0
284  ));
285  #if defined BUILDVP1LIGHT
286  if(VP1QtUtils::expertSettingIsOn("general","ExpertSettings/VP1_ADVANCED_ANTIALIASING")){
287  m_checkboxAntiAliasing->setChecked(true);
288  }
289  connect(m_checkboxAntiAliasing, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("general","ExpertSettings/VP1_ADVANCED_ANTIALIASING");});
290  #else
291  if(VP1QtUtils::environmentVariableIsOn("VP1_ADVANCED_ANTIALIASING")){
292  m_checkboxAntiAliasing->setChecked(true);
293  }
294  connect(m_checkboxAntiAliasing, &QCheckBox::toggled, [this](){GeneralTab::setExpertSetting("VP1_ADVANCED_ANTIALIASING");});
295  #endif
296 
297 
298 
299  QGroupBox *directoryGroup = new QGroupBox(tr("Directory settings"));
300 
301  m_browseButton1 = new QPushButton(tr("&Browse..."), this);
302  connect(m_browseButton1, &QAbstractButton::clicked, this, &GeneralTab::on_browseButton1_clicked);
303  #if defined BUILDVP1LIGHT
304  m_lineEdit1 = new QLineEdit(VP1QtUtils::expertSettingValue("general","ExpertSettings/VP1_SCREENSHOTS_DIR"), this);
305  #else
306  m_lineEdit1 = new QLineEdit(VP1QtUtils::environmentVariableValue("VP1_SCREENSHOTS_DIR"), this);
307  #endif
308  m_lineEdit1->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
309  " <div style=\"width: 300px;\">Turns on the automatic generation of screen-shots for all channels at every event. The value must be a valid writable directory, where all generated screenshot files will be stored.</div>"
310  " </html>", 0
311  ));
312  connect(m_lineEdit1, &QLineEdit::textChanged, this, &GeneralTab::slotScreenshotDirChanged);
313 
314 
315  QVBoxLayout *generalLayout = new QVBoxLayout;
316  generalLayout->addWidget(m_checkboxVerbose);
317  generalLayout->addWidget(m_checkboxDebug);
318  generalLayout->addWidget(m_checkboxDisallowMultipleChannels);
319  generalLayout->addWidget(m_checkboxDisplayMouseClicks);
320  generalLayout->addWidget(m_checkboxEnableAskOnClose);
321  generalLayout->addWidget(m_checkboxGuidesSphereInsteadOfCoordaxes);
322  generalLayout->addWidget(m_checkboxAntiAliasing);
323  generalGroup->setLayout(generalLayout);
324 
325  QGridLayout *gridLayout = new QGridLayout(this);
326  gridLayout->addWidget(new QLabel(tr("Screenshots directory:")), 0, 0);
327  gridLayout->addWidget(m_lineEdit1,1,0);
328  gridLayout->addWidget(m_browseButton1,1,1);
329  directoryGroup->setLayout(gridLayout);
330 
331  QVBoxLayout *mainLayout = new QVBoxLayout;
332  mainLayout->addWidget(generalGroup);
333  mainLayout->addWidget(directoryGroup);
334  mainLayout->addStretch(1);
335  setLayout(mainLayout);
336 
337 }
338 
339 #if defined BUILDVP1LIGHT
340 void GeneralTab::setExpertSetting(const QString &type, const QString &name){
343  } else {
345  }
346 }
347 #else
348 void GeneralTab::setExpertSetting(const QString &name){
351  } else {
353  }
354 }
355 #endif
356 
358  QString fileName = QFileDialog::getExistingDirectory(this,
359  tr("Select screenshot directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
360 
361  m_lineEdit1->setText(fileName);
362 }
363 
366 }
367 
368 
370  : QWidget(parent)
371 {
372  QGroupBox *checkBoxGroup = new QGroupBox(tr("Advanced settings"));
373 
374  m_checkboxEnableInformOnEndOfJob = new QCheckBox("&Enable inform on end of job", this);
375  m_checkboxEnableInformOnEndOfJob->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
376  " <div style=\"width: 300px;\">By default, VP1 simply exits at the end of the ATHENA job, which might be confusing to some. When this variable is set, VP1 will show an dialog, letting the user know that the end of the job has been reached.</div>"
377  " </html>", 0
378  ));
379  #if defined BUILDVP1LIGHT
380  if(VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_ENABLE_INFORM_ON_END_OF_JOB")){
381  m_checkboxEnableInformOnEndOfJob->setChecked(true);
382  }
383  connect(m_checkboxEnableInformOnEndOfJob, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("expert","ExpertSettings/VP1_ENABLE_INFORM_ON_END_OF_JOB");});
384  #else
385  if(VP1QtUtils::environmentVariableIsOn("VP1_ENABLE_INFORM_ON_END_OF_JOB")){
386  m_checkboxEnableInformOnEndOfJob->setChecked(true);
387  }
388  connect(m_checkboxEnableInformOnEndOfJob, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("VP1_ENABLE_INFORM_ON_END_OF_JOB");});
389  #endif
390 
391  m_checkboxHardExitAtEnd = new QCheckBox("&Hard exit at end", this);
392  m_checkboxHardExitAtEnd->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
393  " <div style=\"width: 300px;\">By default, the VP1 algorithm simply tells ATHENA to end the job when VP1 is being closed. This means that ATHENA will shut down with its usual procedure, calling finalise on algorithms, generating summaries, etc. If this variable is set, then VP1 will make the process end immediately and abrubtly instead - saving the user some time.</div>"
394  " </html>", 0
395  ));
396  #if defined BUILDVP1LIGHT
397  if(VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_HARD_EXIT_AT_END")){
398  m_checkboxHardExitAtEnd->setChecked(true);
399  }
400  connect(m_checkboxHardExitAtEnd, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("expert","ExpertSettings/VP1_HARD_EXIT_AT_END");});
401  #else
402  if(VP1QtUtils::environmentVariableIsOn("VP1_HARD_EXIT_AT_END")){
403  m_checkboxHardExitAtEnd->setChecked(true);
404  }
405  connect(m_checkboxHardExitAtEnd, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("VP1_HARD_EXIT_AT_END");});
406  #endif
407 
408  m_checkboxDevelShowAllCruiseAndEventControls = new QCheckBox("&Show all cruise and event controls", this);
409  m_checkboxDevelShowAllCruiseAndEventControls->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
410  " <div style=\"width: 300px;\">Use to enable a few controls related to VP1 cruise-mode, which have presently been disabled.</div>"
411  " </html>", 0
412  ));
413  #if defined BUILDVP1LIGHT
414  if(VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS")){
416  }
417  connect(m_checkboxDevelShowAllCruiseAndEventControls, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("expert","ExpertSettings/VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS");});
418  #else
419  if(VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS")){
421  }
422  connect(m_checkboxDevelShowAllCruiseAndEventControls, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS");});
423  #endif
424 
425 
426  QGroupBox *directoryGroup = new QGroupBox(tr("Directory settings"));
427 
428  m_browseButton1 = new QPushButton(tr("&Browse..."), this);
429  connect(m_browseButton1, &QAbstractButton::clicked, this, &AdvancedTab::on_browseButton1_clicked);
430  m_lineEdit1 = new QLineEdit("", this);
431 
432  #if defined BUILDVP1LIGHT
433  if(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH")==""){
434  #ifdef MACBUNDLE
435  m_lineEdit1->setText(QCoreApplication::applicationDirPath()+"/../Frameworks");
436  #else
437  m_lineEdit1->setText(QCoreApplication::applicationDirPath()+"/../lib");
438  #endif
439  } else {
440  m_lineEdit1->setText(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH"));
441  }
442  #else
443  if(VP1QtUtils::environmentVariableValue("VP1PLUGINPATH")==""){
444  m_lineEdit1->setText(QCoreApplication::applicationDirPath()+"/../lib");
445  } else {
446  m_lineEdit1->setText(VP1QtUtils::environmentVariableValue("VP1PLUGINPATH"));
447  }
448  #endif
449  m_lineEdit1->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
450  " <div style=\"width: 300px;\">Select the directory that contains the plugin libraries.</div>"
451  " </html>", 0
452  ));
453  connect(m_lineEdit1, &QLineEdit::textChanged, this, &AdvancedTab::slotPluginPathChanged);
454 
455  m_browseButton2 = new QPushButton(tr("B&rowse..."), this);
456  connect(m_browseButton2, &QAbstractButton::clicked, this, &AdvancedTab::on_browseButton2_clicked);
457  #if defined BUILDVP1LIGHT
458  m_lineEdit2 = new QLineEdit(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_FILESELECTDIR"), this);
459  #else
460  m_lineEdit2 = new QLineEdit(VP1QtUtils::environmentVariableValue("VP1_FILESELECTDIR"), this);
461  #endif
462  m_lineEdit2->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
463  " <div style=\"width: 300px;\">By default, the various VP1 file selectors starts in the job run-directory. Setting this variable to a directory ensures that that directory is used by default instead.</div>"
464  " </html>", 0
465  ));
466  connect(m_lineEdit2, &QLineEdit::textChanged, this, &AdvancedTab::slotFileSelectDirChanged);
467 
468  m_browseButton3 = new QPushButton(tr("Br&owse..."), this);
469  connect(m_browseButton3, &QAbstractButton::clicked, this, &AdvancedTab::on_browseButton3_clicked);
470  #if defined BUILDVP1LIGHT
471  m_lineEdit3 = new QLineEdit(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_AUTH_ENABLELOG"), this);
472  #else
473  m_lineEdit3 = new QLineEdit(VP1QtUtils::environmentVariableValue("VP1_AUTH_ENABLELOG"), this);
474  #endif
475  m_lineEdit3->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
476  " <div style=\"width: 300px;\">Enables creation of an authentication log file for VP1 live.</div>"
477  " </html>", 0
478  ));
479  connect(m_lineEdit3, &QLineEdit::textChanged, this, &AdvancedTab::slotAuthLogChanged);
480 
481 
482  QVBoxLayout *checkBoxLayout = new QVBoxLayout;
483  checkBoxLayout->addWidget(m_checkboxEnableInformOnEndOfJob);
484  checkBoxLayout->addWidget(m_checkboxHardExitAtEnd);
485  checkBoxLayout->addWidget(m_checkboxDevelShowAllCruiseAndEventControls);
486  checkBoxGroup->setLayout(checkBoxLayout);
487 
488  QGridLayout *gridLayout = new QGridLayout(this);
489  gridLayout->addWidget(new QLabel(tr("Plugin path:")), 0, 0);
490  gridLayout->addWidget(m_lineEdit1,1,0);
491  gridLayout->addWidget(m_browseButton1,1,1);
492  gridLayout->addWidget(new QLabel(tr("File selection directory:")), 2, 0);
493  gridLayout->addWidget(m_lineEdit2,3,0);
494  gridLayout->addWidget(m_browseButton2,3,1);
495  gridLayout->addWidget(new QLabel(tr("Authentication log directory:")), 4, 0);
496  gridLayout->addWidget(m_lineEdit3,5,0);
497  gridLayout->addWidget(m_browseButton3,5,1);
498  directoryGroup->setLayout(gridLayout);
499 
500  QVBoxLayout *mainLayout = new QVBoxLayout;
501  mainLayout->addWidget(checkBoxGroup);
502  mainLayout->addWidget(directoryGroup);
503  mainLayout->addStretch(1);
504  setLayout(mainLayout);
505 }
506 
508 {
509  QString fileName = QFileDialog::getExistingDirectory(this,
510  tr("Select Plugin Path"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
511 
512  m_lineEdit1->setText(fileName);
513 }
514 
516 {
517  QString fileName = QFileDialog::getExistingDirectory(this,
518  tr("Select file directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
519 
520  m_lineEdit2->setText(fileName);
521 }
522 
524 {
525  QString fileName = QFileDialog::getExistingDirectory(this,
526  tr("Select authentication directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
527 
528  m_lineEdit3->setText(fileName);
529 }
530 
533 }
534 
537 }
538 
541 }
542 
543 #if defined BUILDVP1LIGHT
544 void AdvancedTab::setExpertSetting(const QString &type, const QString &name){
547  } else {
549  }
550 }
551 #else
552 void AdvancedTab::setExpertSetting(const QString &name){
555  } else {
557  }
558 }
559 #endif
VP1QtUtils::setEnvironmentVariable
static void setEnvironmentVariable(const QString &name, const QString &content)
Definition: VP1QtUtils.cxx:146
AdvancedTab::m_browseButton2
QPushButton * m_browseButton2
Definition: VP1ExpertSettings.h:120
AdvancedTab::slotPluginPathChanged
void slotPluginPathChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:531
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
GeneralTab::m_checkboxDebug
QCheckBox * m_checkboxDebug
Definition: VP1ExpertSettings.h:78
GeneralTab::m_checkboxAntiAliasing
QCheckBox * m_checkboxAntiAliasing
Definition: VP1ExpertSettings.h:83
VP1ExpertSettings::closeEvent
void closeEvent(QCloseEvent *event)
Definition: VP1ExpertSettings.cxx:92
AdvancedTab::signalAuthLogChanged
void signalAuthLogChanged(const QString &path)
AdvancedTab::m_lineEdit3
QLineEdit * m_lineEdit3
Definition: VP1ExpertSettings.h:127
VP1ExpertSettings::m_authLog
QString m_authLog
Definition: VP1ExpertSettings.h:41
VP1Msg.h
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
AdvancedTab::m_lineEdit2
QLineEdit * m_lineEdit2
Definition: VP1ExpertSettings.h:126
VP1QtUtils.h
VP1ExpertSettings::setScreenshotDir
void setScreenshotDir(const QString &path)
Definition: VP1ExpertSettings.cxx:154
VP1ExpertSettings::setFileSelectDir
void setFileSelectDir(const QString &path)
Definition: VP1ExpertSettings.cxx:150
GeneralTab::m_browseButton1
QPushButton * m_browseButton1
Definition: VP1ExpertSettings.h:84
VP1ExpertSettings::setExpertSetting
void setExpertSetting(const QString &type, const QString &name)
Definition: VP1ExpertSettings.cxx:162
AdvancedTab::m_lineEdit1
QLineEdit * m_lineEdit1
Definition: VP1ExpertSettings.h:125
VP1QtUtils::expertSettingValue
static QString expertSettingValue(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:43
AdvancedTab::m_checkboxDevelShowAllCruiseAndEventControls
QCheckBox * m_checkboxDevelShowAllCruiseAndEventControls
Definition: VP1ExpertSettings.h:124
Args
Definition: test_lwtnn_fastgraph.cxx:12
VP1ExpertSettings::m_screenshotDir
QString m_screenshotDir
Definition: VP1ExpertSettings.h:40
GeneralTab::slotScreenshotDirChanged
void slotScreenshotDirChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:364
GeneralTab::GeneralTab
GeneralTab(QWidget *parent=0)
Definition: VP1ExpertSettings.cxx:170
VP1ExpertSettings::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition: VP1ExpertSettings.cxx:141
GeneralTab::m_checkboxDisallowMultipleChannels
QCheckBox * m_checkboxDisallowMultipleChannels
Definition: VP1ExpertSettings.h:79
VP1QtUtils::environmentVariableValue
static QString environmentVariableValue(const QString &name)
Definition: VP1QtUtils.cxx:117
VP1Msg::enableMsg
static void enableMsg(const QString &)
Definition: VP1Msg.cxx:198
VP1ExpertSettings::VP1ExpertSettings
VP1ExpertSettings(QWidget *parent=0)
Definition: VP1ExpertSettings.cxx:43
GeneralTab::m_lineEdit1
QLineEdit * m_lineEdit1
Definition: VP1ExpertSettings.h:85
VP1QtUtils::setExpertSetting
static void setExpertSetting(const QString &type, const QString &name, const QString &content)
Definition: VP1QtUtils.cxx:86
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
VP1QtUtils::environmentVariableIsOn
static bool environmentVariableIsOn(const QString &name)
Definition: VP1QtUtils.cxx:127
VP1ExpertSettings::m_tabWidget
QTabWidget * m_tabWidget
Definition: VP1ExpertSettings.h:43
GeneralTab::on_browseButton1_clicked
void on_browseButton1_clicked()
Definition: VP1ExpertSettings.cxx:357
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AdvancedTab::m_checkboxEnableInformOnEndOfJob
QCheckBox * m_checkboxEnableInformOnEndOfJob
Definition: VP1ExpertSettings.h:122
VP1ExpertSettings::setAuthLog
void setAuthLog(const QString &path)
Definition: VP1ExpertSettings.cxx:158
AdvancedTab
Definition: VP1ExpertSettings.h:94
VP1ExpertSettings::m_pluginPath
QString m_pluginPath
Definition: VP1ExpertSettings.h:38
AdvancedTab::slotAuthLogChanged
void slotAuthLogChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:539
VP1QtUtils::expertSettingIsOn
static bool expertSettingIsOn(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:60
GeneralTab::m_checkboxEnableAskOnClose
QCheckBox * m_checkboxEnableAskOnClose
Definition: VP1ExpertSettings.h:81
AdvancedTab::slotFileSelectDirChanged
void slotFileSelectDirChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:535
AdvancedTab::on_browseButton1_clicked
void on_browseButton1_clicked()
Definition: VP1ExpertSettings.cxx:507
AdvancedTab::m_checkboxHardExitAtEnd
QCheckBox * m_checkboxHardExitAtEnd
Definition: VP1ExpertSettings.h:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
VP1ExpertSettings::m_buttonBox
QDialogButtonBox * m_buttonBox
Definition: VP1ExpertSettings.h:42
AdvancedTab::on_browseButton2_clicked
void on_browseButton2_clicked()
Definition: VP1ExpertSettings.cxx:515
VP1QtUtils::unsetEnvironmentVariable
static void unsetEnvironmentVariable(const QString &name)
Definition: VP1QtUtils.cxx:161
VP1ExpertSettings::setPluginPath
void setPluginPath(const QString &path)
Definition: VP1ExpertSettings.cxx:146
GeneralTab::m_checkboxDisplayMouseClicks
QCheckBox * m_checkboxDisplayMouseClicks
Definition: VP1ExpertSettings.h:80
unused
void unused(Args &&...)
Definition: VP1ExpertSettings.cxx:39
AdvancedTab::m_browseButton3
QPushButton * m_browseButton3
Definition: VP1ExpertSettings.h:121
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AdvancedTab::m_browseButton1
QPushButton * m_browseButton1
Definition: VP1ExpertSettings.h:119
GeneralTab::setExpertSetting
void setExpertSetting(const QString &name)
Definition: VP1ExpertSettings.cxx:348
AdvancedTab::AdvancedTab
AdvancedTab(QWidget *parent=0)
Definition: VP1ExpertSettings.cxx:369
AdvancedTab::on_browseButton3_clicked
void on_browseButton3_clicked()
Definition: VP1ExpertSettings.cxx:523
AdvancedTab::setExpertSetting
void setExpertSetting(const QString &name)
Definition: VP1ExpertSettings.cxx:552
GeneralTab
Definition: VP1ExpertSettings.h:58
GeneralTab::m_checkboxGuidesSphereInsteadOfCoordaxes
QCheckBox * m_checkboxGuidesSphereInsteadOfCoordaxes
Definition: VP1ExpertSettings.h:82
VP1ExpertSettings::m_fileSelectDir
QString m_fileSelectDir
Definition: VP1ExpertSettings.h:39
GeneralTab::signalScreenshotDirChanged
void signalScreenshotDirChanged(const QString &path)
GeneralTab::m_checkboxVerbose
QCheckBox * m_checkboxVerbose
Definition: VP1ExpertSettings.h:77
AdvancedTab::signalPluginPathChanged
void signalPluginPathChanged(const QString &path)
VP1ExpertSettings.h
AdvancedTab::signalFileSelectDirChanged
void signalFileSelectDirChanged(const QString &path)