20 #include <QPushButton>
21 #include <QGridLayout>
30 # pragma GCC diagnostic push
31 # pragma GCC diagnostic ignored "-Wtemplate-id-cdtor"
35 # pragma GCC diagnostic pop
52 #if defined BUILDVP1LIGHT
77 m_buttonBox =
new QDialogButtonBox(QDialogButtonBox::Ok);
82 QVBoxLayout *mainLayout =
new QVBoxLayout;
85 setLayout(mainLayout);
87 this->setWindowTitle(tr(
"VP1 Settings"));
95 #if defined BUILDVP1LIGHT
104 #if defined BUILDVP1LIGHT
116 #if defined BUILDVP1LIGHT
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);
125 cb->setChecked(
true);
129 if(cb->checkState()==Qt::Unchecked){
142 if(
event->key() == Qt::Key_Escape)
143 VP1ExpertSettings::close();
174 QGroupBox *generalGroup =
new QGroupBox(tr(
"General settings"));
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>"
181 #if defined BUILDVP1LIGHT
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>"
198 #if defined BUILDVP1LIGHT
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>"
215 #if defined BUILDVP1LIGHT
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>"
232 #if defined BUILDVP1LIGHT
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>"
249 #if defined BUILDVP1LIGHT
264 " <div style=\"width: 300px;\">Replaces the coordinate axes with a red sphere.</div>"
267 #if defined BUILDVP1LIGHT
282 " <div style=\"width: 300px;\">Switches on advanced Anti-Aliasing. WARNING: May cause issues with certain graphics drivers.</div>"
285 #if defined BUILDVP1LIGHT
299 QGroupBox *directoryGroup =
new QGroupBox(tr(
"Directory settings"));
303 #if defined BUILDVP1LIGHT
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>"
315 QVBoxLayout *generalLayout =
new QVBoxLayout;
323 generalGroup->setLayout(generalLayout);
325 QGridLayout *gridLayout =
new QGridLayout(
this);
326 gridLayout->addWidget(
new QLabel(tr(
"Screenshots directory:")), 0, 0);
329 directoryGroup->setLayout(gridLayout);
331 QVBoxLayout *mainLayout =
new QVBoxLayout;
332 mainLayout->addWidget(generalGroup);
333 mainLayout->addWidget(directoryGroup);
334 mainLayout->addStretch(1);
335 setLayout(mainLayout);
339 #if defined BUILDVP1LIGHT
358 QString
fileName = QFileDialog::getExistingDirectory(
this,
359 tr(
"Select screenshot directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
372 QGroupBox *checkBoxGroup =
new QGroupBox(tr(
"Advanced settings"));
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>"
379 #if defined BUILDVP1LIGHT
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>"
396 #if defined BUILDVP1LIGHT
410 " <div style=\"width: 300px;\">Use to enable a few controls related to VP1 cruise-mode, which have presently been disabled.</div>"
413 #if defined BUILDVP1LIGHT
426 QGroupBox *directoryGroup =
new QGroupBox(tr(
"Directory settings"));
432 #if defined BUILDVP1LIGHT
435 m_lineEdit1->setText(QCoreApplication::applicationDirPath()+
"/../Frameworks");
437 m_lineEdit1->setText(QCoreApplication::applicationDirPath()+
"/../lib");
444 m_lineEdit1->setText(QCoreApplication::applicationDirPath()+
"/../lib");
449 m_lineEdit1->setToolTip( QApplication::translate(__FUNCTION__,
" <html>\n"
450 " <div style=\"width: 300px;\">Select the directory that contains the plugin libraries.</div>"
457 #if defined BUILDVP1LIGHT
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>"
470 #if defined BUILDVP1LIGHT
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>"
482 QVBoxLayout *checkBoxLayout =
new QVBoxLayout;
486 checkBoxGroup->setLayout(checkBoxLayout);
488 QGridLayout *gridLayout =
new QGridLayout(
this);
489 gridLayout->addWidget(
new QLabel(tr(
"Plugin path:")), 0, 0);
492 gridLayout->addWidget(
new QLabel(tr(
"File selection directory:")), 2, 0);
495 gridLayout->addWidget(
new QLabel(tr(
"Authentication log directory:")), 4, 0);
498 directoryGroup->setLayout(gridLayout);
500 QVBoxLayout *mainLayout =
new QVBoxLayout;
501 mainLayout->addWidget(checkBoxGroup);
502 mainLayout->addWidget(directoryGroup);
503 mainLayout->addStretch(1);
504 setLayout(mainLayout);
509 QString
fileName = QFileDialog::getExistingDirectory(
this,
510 tr(
"Select Plugin Path"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
517 QString
fileName = QFileDialog::getExistingDirectory(
this,
518 tr(
"Select file directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
525 QString
fileName = QFileDialog::getExistingDirectory(
this,
526 tr(
"Select authentication directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
543 #if defined BUILDVP1LIGHT