|
ATLAS Offline Software
|
#include <VP1MainWindow.h>
Definition at line 81 of file VP1MainWindow.h.
◆ VP1MainWindow()
Definition at line 89 of file VP1MainWindow.cxx.
108 #if defined BUILDVP1LIGHT
114 if (!checkShowAllCruiseAndEventControls) {
115 pushButton_eventseek->setVisible(
false);
116 groupBox_cruise->setVisible(
false);
129 menubar->addAction(
menu_file->menuAction());
135 #ifndef BUILDVP1LIGHT
136 pushButton_previousevent->setVisible(
false);
137 pushButton_eventselect->setVisible(
false);
139 pushButton_eventselect->setVisible(
true);
140 pushButton_eventselect->setText(
"Event: 0/0");
141 pushButton_eventselect->setEnabled(
false);
142 pushButton_previousevent->setEnabled(
false);
146 pushButton_quicksetup_trackingstudies->setEnabled(
false);
147 pushButton_quicksetup_trackingstudies->setToolTip(
"Not available in VP1Light");
148 pushButton_quicksetup_calostudies->setEnabled(
false);
149 pushButton_quicksetup_calostudies->setToolTip(
"Not available in VP1Light");
150 action_quicklaunch_Tracking_studies->setEnabled(
false);
151 action_quicklaunch_Tracking_studies->setToolTip(
"Not available in VP1Light");
152 action_quicklaunch_Calo_studies->setEnabled(
false);
153 action_quicklaunch_Calo_studies->setToolTip(
"Not available in VP1Light");
154 action_quicklaunch_Storegate_browser->setEnabled(
false);
155 action_quicklaunch_Storegate_browser->setToolTip(
"Not available in VP1Light");
156 action_quicklaunch_trackcalo_commis->setEnabled(
false);
157 action_quicklaunch_trackcalo_commis->setToolTip(
"Not available in VP1Light");
166 QStringList inputdirs;
170 if (availLocal&&!inputdirs.isEmpty()) {
176 QMenu * menu_inputdir =
new QMenu(menubar);
177 menu_inputdir->setObjectName(
"menu_inputdir");
178 menu_inputdir->setTitle(
"&Stream");
180 menubar->addAction(menu_inputdir->menuAction());
182 QActionGroup * inputdir_actiongroup =
new QActionGroup(menu_inputdir);
183 QAction*action_inputdir_current(0);
184 foreach (QString
inputdir, inputdirs) {
188 QAction * action_inputdir =
new QAction(
this);
189 action_inputdir->setObjectName(
"action_inputdir_"+
dirname);
191 action_inputdir->setStatusTip(
"Get input files from: "+
inputdir);
192 action_inputdir->setCheckable(
true);
195 action_inputdir_current = action_inputdir;
196 menu_inputdir->addAction(action_inputdir);
197 inputdir_actiongroup->addAction(action_inputdir);
201 if (action_inputdir_current) {
202 action_inputdir_current->blockSignals(
true);
203 action_inputdir_current->setChecked(
true);
204 action_inputdir_current->blockSignals(
false);
218 QTimer *
timer =
new QTimer(
this);
233 for (
int i=0;
i<stackedWidget_central->count();++
i)
234 stackedWidget_central->widget(
i)->layout()->setContentsMargins(0,0,0,0);
237 frame_instructions->setFrameShape(QFrame::StyledPanel);
240 #ifndef BUILDVP1LIGHT
270 connect(pushButton_channelfullscreen,SIGNAL(clicked()),
m_tabmanager,SLOT(showCurrentChannelFullScreen()));
285 connect(action_exit_VP1,SIGNAL(triggered(
bool)),
this,SLOT(close()));
291 menuConfiguration->addSeparator();
301 QActionGroup * styleGroup =
new QActionGroup(
this);
302 QAction * laststyleact(0);
303 bool foundplastique=
false;
305 QString defaultstyle=
s.value(
"style/defaultstyle",
"Fusion").toString();
308 act->setStatusTip(
"Change application style to "+
style);
310 act->setCheckable(
true);
311 styleGroup->addAction(act);
313 if (act->text()==defaultstyle) {
314 act->setChecked(
true);
319 if (!foundplastique) {
320 laststyleact->setChecked(
true);
326 savedgoal =
s.value(
"font/pixelsize_diff", 0).toInt();
328 savedgoal =
s.value(
"font/pointsize_relativepercent", 0).toInt();
331 QList<int> fontoptions;
333 fontoptions <<15<<10<<+5<<+3<<+2<<+1<<0<<-1<<-2<<-3<<-5<<-10<<-20<<-30;
335 fontoptions <<150<<100<<50<<30<<20<<10<<5<<0<<-5<<-10<<-20<<-30<<-50;
337 QActionGroup * fontGroup =
new QActionGroup(
this);
338 bool foundsavedgoal(
false);
339 QAction * normalfontact(0);
340 foreach (
int fontopt,fontoptions) {
345 act->setStatusTip(
"Change overall font size of application to "+
text);
346 act->setData(fontopt);
347 act->setCheckable(
true);
348 fontGroup->addAction(act);
352 if (savedgoal==fontopt) {
353 act->setChecked(
true);
358 if (!foundsavedgoal) {
359 normalfontact->setChecked(
true);
365 menuConfiguration->addSeparator();
373 menuConfiguration->addSeparator();
382 connect(pushButton_previousevent,SIGNAL(clicked()),
this,SLOT(goToPreviousEvent()));
383 connect(pushButton_eventselect,SIGNAL(clicked()),
this,SLOT(chooseEvent()));
403 QMenu* menu_help =
new QMenu(menubar);
404 menu_help->setObjectName(
"menu_help");
405 menu_help->setTitle(
"&Help");
406 menubar->addAction(menu_help->menuAction());
410 menu_help->addSeparator();
423 #ifndef BUILDVP1LIGHT
424 menubar->setEnabled(
false);
◆ ~VP1MainWindow()
VP1MainWindow::~VP1MainWindow |
( |
| ) |
|
◆ addChannelIconsToComboBox()
void VP1MainWindow::addChannelIconsToComboBox |
( |
QComboBox * |
cb, |
|
|
const bool & |
isbasenames |
|
) |
| |
|
protected |
Definition at line 627 of file VP1MainWindow.cxx.
629 for (
int i = 0;
i<
n; ++
i) {
631 if (!icontext.isEmpty())
632 cb->setItemIcon (
i, QIcon(icontext) );
◆ addEventFile
void VP1MainWindow::addEventFile |
( |
| ) |
|
|
protectedslot |
Definition at line 1876 of file VP1MainWindow.cxx.
1878 QString newEventFile = QFileDialog::getOpenFileName(NULL
1879 ,tr(
"Open Event File")
1881 ,tr(
"All files (*.*)"));
1882 if(newEventFile.isEmpty())
return;
1885 addToMessageBox(newEventFile +
" will be appended to the list of input files");
1888 QMessageBox::critical(0, newEventFile +
" either does not exist or is not readable",
1889 newEventFile +
" either does not exist or is not readable",
1890 QMessageBox::Ok,QMessageBox::Ok);
◆ addToMessageBox
void VP1MainWindow::addToMessageBox |
( |
const QString & |
m, |
|
|
const QString & |
extrastyleopts = "" , |
|
|
const QString & |
title = "" , |
|
|
const QString & |
titleextrastyleopts = "" |
|
) |
| |
|
slot |
Definition at line 1017 of file VP1MainWindow.cxx.
1021 if (
title.isEmpty())
1027 QString titlepart = (
title.isEmpty() ?
"" : ( titleextrastyleopts.isEmpty() ?
title
1028 :
"<span style=\"font-style:italic;"+titleextrastyleopts+
";\">["+
title+
"]</span> "));
1030 textBrowser_channelmessages->append(titlepart
1031 + ( extrastyleopts.isEmpty() ?
m
1032 :
"<span style=\"font-style:italic;"+extrastyleopts+
";\">"+
m+
"</span>"));
1033 textBrowser_channelmessages->verticalScrollBar()->setSliderPosition(textBrowser_channelmessages->verticalScrollBar()->maximum());
◆ availableFiles()
QMap< QString, QString > VP1MainWindow::availableFiles |
( |
const QString & |
extension, |
|
|
const QString & |
pathvar, |
|
|
const QString & |
instareasubdir, |
|
|
const QString & |
extradirenvvar, |
|
|
bool |
currentdir = false |
|
) |
| const |
|
protected |
Definition at line 724 of file VP1MainWindow.cxx.
731 qDebug() <<
"VP1MainWindow::availableFiles()";
732 qDebug() <<
"extension:" << extension <<
"pathvar:" << pathvar <<
"instareasubdir:" << instareasubdir <<
"extradirenvvar:" << extradirenvvar <<
"currentdir:" <<
currentdir;
736 QStringList vp1pluginpath =
737 extradirenvvar.isEmpty() ?
739 QString(::
getenv(extradirenvvar.toStdString().c_str())) .
740 #
if QTCORE_VERSION >= 0x050E00
741 split(
":",Qt::SkipEmptyParts);
743 split(
":",QString::SkipEmptyParts);
746 qDebug() <<
"extradirenvvar:" << extradirenvvar;
747 qDebug() <<
"vp1pluginpath:" << vp1pluginpath;
753 vp1pluginpath<<QCoreApplication::applicationDirPath()+
"/../lib";
761 vp1pluginpath<<QDir::currentPath();
767 QProcessEnvironment
env = QProcessEnvironment::systemEnvironment();
769 QString
path =
env.value(pathvar);
772 if (!
path.isEmpty()) {
773 #if QTCORE_VERSION >= 0x050E00
775 QStringList
tmp =
path.split(
":",Qt::SkipEmptyParts);
778 QStringList
tmp =
path.split(
":",QString::SkipEmptyParts);
781 vp1pluginpath << ( instareasubdir.isEmpty() ?
dir :
dir+QDir::separator()+instareasubdir );
786 int nDuplicatesRemoved = vp1pluginpath.removeDuplicates();
791 for (
const auto& plugindir : vp1pluginpath) {
793 QFileInfo
fi(plugindir);
794 if (!
fi.exists()||!
fi.isDir()) {
796 if (vp1pluginpath.contains(plugindir)) {
797 vp1pluginpath.removeAt(
idx);
801 VP1Msg::messageDebug(
"plugindir not present; perhaps, it has been removed already. Skipping it...");
808 QMap<QString,QString> plugins2fullpath;
809 for (QString plugindir : vp1pluginpath) {
810 QStringList plugins = QDir(plugindir).entryList((QStringList()<<(
"*"+extension)),QDir::CaseSensitive |
QDir::Files | QDir::Readable,
QDir::Name);
811 for (QString
plugin : plugins) {
813 if (!plugins2fullpath.contains(
plugin)) {
819 return plugins2fullpath;
◆ availablePluginFiles()
QMap< QString, QString > VP1MainWindow::availablePluginFiles |
( |
| ) |
const |
|
protected |
Definition at line 823 of file VP1MainWindow.cxx.
828 QString sharedlibsuffix =
"dylib";
830 QString sharedlibsuffix =
"so";
833 return availableFiles(
"."+sharedlibsuffix,
"LD_LIBRARY_PATH",
"vp1plugins",
"VP1PLUGINPATH" );
◆ changeFontSize
void VP1MainWindow::changeFontSize |
( |
int |
goal | ) |
|
|
slot |
Definition at line 1617 of file VP1MainWindow.cxx.
1629 s.setValue(
"font/pixelsize_diff",goal);
1632 double fact = (goal+100.0)/100.0;
1633 if (fact<0.01||fact>50)
1638 newfont.setPointSizeF(newpointsize);
1639 s.setValue(
"font/pointsize_relativepercent",goal);
1641 QApplication::setFont(newfont);
◆ changeFontSizeActionTriggered
void VP1MainWindow::changeFontSizeActionTriggered |
( |
| ) |
|
|
protectedslot |
Definition at line 1602 of file VP1MainWindow.cxx.
1604 QAction * act =
static_cast<QAction*
>(sender());
1609 int goal = act->data().toInt(&ok);
◆ changeStyleActionTriggered
void VP1MainWindow::changeStyleActionTriggered |
( |
| ) |
|
|
protectedslot |
Definition at line 1586 of file VP1MainWindow.cxx.
1588 QAction * act =
static_cast<QAction*
>(sender());
1597 s.setValue(
"style/defaultstyle",act->text());
◆ channelAddToMessageBox
void VP1MainWindow::channelAddToMessageBox |
( |
const QString & |
m | ) |
|
|
slot |
◆ channelManager()
◆ closeEvent()
void VP1MainWindow::closeEvent |
( |
QCloseEvent * |
event | ) |
|
|
protected |
Definition at line 938 of file VP1MainWindow.cxx.
942 bool checkEnableAskOnClose;
943 #if defined BUILDVP1LIGHT
949 if (checkEnableAskOnClose) {
950 int ret = QMessageBox::warning(
this,
952 "You are about to close VP1 and end the job.\nProceed?",
953 QMessageBox::Ok| QMessageBox::Cancel,
954 QMessageBox::Cancel );
955 if (ret!=QMessageBox::Ok) {
◆ finishedIncomingDialog
void VP1MainWindow::finishedIncomingDialog |
( |
| ) |
|
|
protectedslot |
◆ getAllChannelsIntoSnapshots
void VP1MainWindow::getAllChannelsIntoSnapshots |
( |
QList< QPixmap > & |
list, |
|
|
QStringList & |
listNames |
|
) |
| |
|
slot |
Definition at line 1119 of file VP1MainWindow.cxx.
1126 if (allTabs.isEmpty()) {
1141 channelname.replace(
' ',
'_');
1153 listNames << channelname;
◆ getEventNumber()
unsigned long long VP1MainWindow::getEventNumber |
( |
| ) |
|
|
inline |
◆ getEventTimestamp()
int VP1MainWindow::getEventTimestamp |
( |
| ) |
|
|
inline |
◆ getRunNumber()
int VP1MainWindow::getRunNumber |
( |
| ) |
|
|
inline |
◆ getSingleChannelCustomSnapshot [1/2]
QPixmap VP1MainWindow::getSingleChannelCustomSnapshot |
( |
IVP1ChannelWidget * |
tab, |
|
|
int |
width = 0 |
|
) |
| |
|
slot |
Definition at line 1162 of file VP1MainWindow.cxx.
1166 std::cout <<
"tab: " << tab << std::endl;
1181 if (snap.isNull()) {
◆ getSingleChannelCustomSnapshot [2/2]
QPixmap VP1MainWindow::getSingleChannelCustomSnapshot |
( |
QString |
tabName, |
|
|
int |
width = 0 |
|
) |
| |
|
slot |
Definition at line 1192 of file VP1MainWindow.cxx.
1196 if (allTabs.isEmpty()) {
1205 channelname.replace(
' ',
'_');
1207 if (channelname == tabName) {
◆ goToNextEvent
void VP1MainWindow::goToNextEvent |
( |
| ) |
|
|
slot |
Definition at line 898 of file VP1MainWindow.cxx.
899 #if defined BUILDVP1LIGHT
900 std::cout <<
"goToNextEvent: \n"
901 <<
"m_scheduler->getEvtNr()+2: " <<
m_scheduler->getEvtNr()+2
902 <<
"\nm_scheduler->getTotEvtNr(): " <<
m_scheduler->getTotEvtNr() << std::endl;
904 std::cout <<
"First case" << std::endl;
910 std::cout <<
"Second case" << std::endl;
◆ help_openAbout
void VP1MainWindow::help_openAbout |
( |
| ) |
|
|
protectedslot |
Definition at line 474 of file VP1MainWindow.cxx.
480 QDesktopServices::openUrl(QUrl(
"https://atlas-vp1.web.cern.ch/atlas-vp1/doc_new/about_vp1/CREDITS.html"));
◆ help_openUserGuide
void VP1MainWindow::help_openUserGuide |
( |
| ) |
|
|
protectedslot |
Definition at line 437 of file VP1MainWindow.cxx.
444 QDesktopServices::openUrl(QUrl(
"http://atlas-vp1.web.cern.ch/atlas-vp1/doc/"));
◆ help_openUserSupport
void VP1MainWindow::help_openUserSupport |
( |
| ) |
|
|
protectedslot |
Definition at line 449 of file VP1MainWindow.cxx.
456 QDesktopServices::openUrl(QUrl(
"http://atlas-vp1.web.cern.ch/atlas-vp1/vp1_users_support/"));
◆ help_openVP1WebSite
void VP1MainWindow::help_openVP1WebSite |
( |
| ) |
|
|
protectedslot |
Definition at line 461 of file VP1MainWindow.cxx.
468 QDesktopServices::openUrl(QUrl(
"http://atlas-vp1.web.cern.ch/atlas-vp1/"));
◆ helperAddToMessageBox
void VP1MainWindow::helperAddToMessageBox |
( |
const QString & |
m | ) |
|
|
slot |
◆ inputDirectoryActionTriggered
void VP1MainWindow::inputDirectoryActionTriggered |
( |
| ) |
|
|
protectedslot |
Definition at line 1846 of file VP1MainWindow.cxx.
1848 QAction * act =
dynamic_cast<QAction*
>(sender());
1854 QString
inputdir(act->data().toString());
1856 if (
fi.exists()&&
fi.isDir()) {
1859 <<
"VP1Message: inputdirectory changed to "
◆ launch3DstereoEditor
void VP1MainWindow::launch3DstereoEditor |
( |
| ) |
|
|
protectedslot |
◆ listenOnTcp()
void VP1MainWindow::listenOnTcp |
( |
| ) |
|
|
protected |
◆ loadConfigurationFromFile
void VP1MainWindow::loadConfigurationFromFile |
( |
QString |
file | ) |
|
|
slot |
◆ loadPluginFile
void VP1MainWindow::loadPluginFile |
( |
QString |
filename | ) |
|
|
slot |
Definition at line 581 of file VP1MainWindow.cxx.
586 if (!
err.isEmpty()) {
587 QMessageBox::critical(0,
"Error - could not load plugin file: "+
filename,
588 "Could not load plugin file: "
589 +
filename+
"\n\nReason: "+
err,QMessageBox::Ok,QMessageBox::Ok);
◆ makeAllChannelsEventDisplay
void VP1MainWindow::makeAllChannelsEventDisplay |
( |
| ) |
|
|
slot |
Definition at line 1089 of file VP1MainWindow.cxx.
1093 QList<QPixmap>
list;
1094 QStringList listNames;
1095 QList<unsigned long long> listRunEventNumberTimestamp;
◆ mustQuit()
bool VP1MainWindow::mustQuit |
( |
| ) |
const |
◆ nextEvent()
void VP1MainWindow::nextEvent |
( |
| ) |
|
◆ okToProceedToNextEvent()
bool VP1MainWindow::okToProceedToNextEvent |
( |
| ) |
const |
◆ pluginDialogClosed
void VP1MainWindow::pluginDialogClosed |
( |
| ) |
|
|
slot |
◆ postInitUpdates
void VP1MainWindow::postInitUpdates |
( |
| ) |
|
|
protectedslot |
Definition at line 486 of file VP1MainWindow.cxx.
490 int sum1 = splitter_tabwidget_messagebox->sizes().at(0) + splitter_tabwidget_messagebox->sizes().at(1);
491 QList<int> sizes1; sizes1 << sum1 << 0;
492 splitter_tabwidget_messagebox->setSizes ( sizes1 );
494 while (splitter_tabwidget_messagebox->sizes().at(1)==0&&bottom<50000) {
495 QList<int> sizes2; sizes2 << sum1-bottom << bottom;
496 splitter_tabwidget_messagebox->setSizes ( sizes2 );
500 int sum2 = splitter_leftright->sizes().at(0) + splitter_leftright->sizes().at(1);
502 QList<int> sizes3; sizes3 << left << sum2-left;
503 splitter_leftright->setSizes ( sizes3 );
504 while (splitter_leftright->sizes().at(0)==0&&left<50000) {
505 QList<int> sizes4; sizes4 << left << sum2-left;
506 splitter_leftright->setSizes ( sizes4 );
510 int prefwidths = std::max<int>(left,widget_controlsContainer->sizeHint().width());
511 prefwidths = std::max<int>(prefwidths,groupBox_channelcontrols->sizeHint().width());
512 prefwidths = std::max<int>(prefwidths,groupBox_cruise->sizeHint().width());
513 prefwidths = std::max<int>(prefwidths,groupBox_event->sizeHint().width());
514 prefwidths = std::max<int>(prefwidths,stackedWidget_customcontrols->sizeHint().width());
515 widget_controlsContainer->setMaximumWidth(50+prefwidths);
◆ processEnqueuedRequests
void VP1MainWindow::processEnqueuedRequests |
( |
| ) |
|
|
protectedslot |
◆ quickSetupTriggered
void VP1MainWindow::quickSetupTriggered |
( |
| ) |
|
|
protectedslot |
Definition at line 1654 of file VP1MainWindow.cxx.
1658 QSettings settings(
"ATLAS",
"VP1Light");
1660 QString plugfile, channelname, tabname;
1662 if (sender()==pushButton_quicksetup_geometrystudies||sender()==action_quicklaunch_Geometry_studies) {
1665 #ifdef BUILDVP1LIGHT
1666 if(settings.value(
"db/dbByEnv").toString().isEmpty()){
1669 if(!dbSelection.result())
1672 #endif // BUILDVP1LIGHT
1674 plugfile=
"libVP1GeometryPlugin.so";
1675 channelname=
"Geometry";
1676 tabname =
"Geometry";
1677 }
else if (sender()==pushButton_quicksetup_trackingstudies||sender()==action_quicklaunch_Tracking_studies) {
1678 plugfile=
"libVP1TrackPlugin.so";
1679 channelname=
"Tracking";
1680 tabname =
"Tracking";
1681 }
else if (sender()==pushButton_quicksetup_calostudies||sender()==action_quicklaunch_Calo_studies) {
1682 plugfile=
"libVP1CaloPlugin.so";
1683 channelname=
"Calo Cells";
1684 tabname =
"Calorimeter";
1685 }
else if (sender()==action_quicklaunch_Storegate_browser) {
1686 plugfile=
"libVP1BanksPlugin.so";
1687 channelname=
"Banks";
1688 tabname =
"StoreGate";
1689 }
else if (sender()==pushButton_quicksetup_3dcocktail||sender()==action_quicklaunch_3dcocktail) {
1690 #ifndef BUILDVP1LIGHT
1691 plugfile=
"libVP13DCocktailPlugin.so";
1692 channelname=
"3DCocktail";
1693 tabname =
"3D Cocktail";
1696 if(settings.value(
"aod/aodByEnv").toString().isEmpty()){
1698 aodSelection.exec();
1699 if(!aodSelection.result())
1702 if(settings.value(
"db/dbByEnv").toString().isEmpty()){
1705 if(!dbSelection.result())
1710 pushButton_eventselect->setEnabled(
true);
1711 plugfile=
"libVP1LightPlugin.so";
1712 channelname=
"VP1Light";
1713 tabname =
"Geometry/AOD";
1714 #endif // BUILDVP1LIGHT
1715 }
else if (sender()==action_quicklaunch_trackcalo_commis) {
1716 plugfile=
"libVP13DCocktailPlugin.so";
1717 channelname=
"TrackCalo";
1718 tabname =
"Track/Calo";
1719 }
else if (sender()==pushButton_quicksetup_analysisstudies||sender()==action_quicklaunch_analysisstudies) {
1722 #ifdef BUILDVP1LIGHT
1723 if(settings.value(
"aod/aodByEnv").toString().isEmpty()){
1725 aodSelection.exec();
1726 if(!aodSelection.result())
1730 pushButton_eventselect->setEnabled(
true);
1731 #endif // BUILDVP1LIGHT
1733 plugfile=
"libVP1AODPlugin.so";
1735 tabname =
"Analysis";
1742 if (plugfile.endsWith(
".so"))
1743 plugfile = plugfile.left(plugfile.count()-3)+
".dylib";
1750 qDebug() <<
"plugins2fullpath: " << plugins2fullpath;
1753 if (!plugins2fullpath.contains(plugfile)) {
1754 QMessageBox::critical(0,
"Error - could not locate plugin file: "+plugfile,
1755 "could not locate plugin file: "
1756 +plugfile,QMessageBox::Ok,QMessageBox::Ok);
1759 QString plugfile_fullpath = plugins2fullpath[plugfile];
1766 QMessageBox::critical(0,
"Error - could not load plugin file: "+plugfile_fullpath,
1767 "Could not load plugin file: "
1768 +plugfile_fullpath+
"\n\nReason: "+
err,QMessageBox::Ok,QMessageBox::Ok);
1776 QMessageBox::critical(0,
"Error - did not find necessary channel: "+channelname,
1777 "Could not find channel: "+channelname+
" in loaded plugin "+plugfile_fullpath,
1778 QMessageBox::Ok,QMessageBox::Ok);
1782 bool save = updatesEnabled();
1783 setUpdatesEnabled(
false);
1790 QMessageBox::critical(0,
"Error - could not create tab: "+newtabname,
1791 "Could not create tab: "+newtabname,
1792 QMessageBox::Ok,QMessageBox::Ok);
1793 setUpdatesEnabled(
save);
1801 QMessageBox::critical(0,
"Error - problems launching channel: "+channelname,
1802 "Problems launching channel: "+channelname,
1803 QMessageBox::Ok,QMessageBox::Ok);
1804 setUpdatesEnabled(
save);
1812 setUpdatesEnabled(
save);
◆ receivedExternalRequest
◆ replaceConfigurationFile
void VP1MainWindow::replaceConfigurationFile |
( |
QString |
file | ) |
|
|
slot |
◆ request_addEmptyTab
void VP1MainWindow::request_addEmptyTab |
( |
| ) |
|
|
slot |
Definition at line 596 of file VP1MainWindow.cxx.
598 QString newtabname = QInputDialog::getText( 0,
"New Tab Name",
"New tab name:",
600 if (!ok||newtabname.isEmpty())
◆ request_channelInformation
void VP1MainWindow::request_channelInformation |
( |
| ) |
|
|
slot |
Definition at line 1069 of file VP1MainWindow.cxx.
1076 out +=
"Systems:\n\n";
1079 out +=
" ==> System "+(*itsys)->name()+
"\n";
1080 out +=
" Contact: "+(*itsys)->contact_info()+
"\n";
1081 out +=
" Information: "+(*itsys)->information()+
"\n";
◆ request_cruisemodechange
void VP1MainWindow::request_cruisemodechange |
( |
| ) |
|
|
slot |
Definition at line 1475 of file VP1MainWindow.cxx.
1477 if (pushButton_cruise->isChecked()) {
1478 if (radioButton_cruise_event->isChecked()) {
1480 groupBox_cruise->setTitle(
"Cruise Mode [event]");
1481 }
else if (radioButton_cruise_tab->isChecked()) {
1483 groupBox_cruise->setTitle(
"Cruise Mode [tab]");
1484 }
else if (radioButton_cruise_both->isChecked()) {
1486 groupBox_cruise->setTitle(
"Cruise Mode [event && tab]");
1487 }
else { assert(0); }
1490 groupBox_cruise->setTitle(
"Cruise Mode [off]");
◆ request_loadConfig
void VP1MainWindow::request_loadConfig |
( |
| ) |
|
|
slot |
Definition at line 693 of file VP1MainWindow.cxx.
695 QString
filename = QFileDialog::getOpenFileName(
this,
"Select configuration file to load",
697 "VP1 configuration files (*.vp1)",0,QFileDialog::DontResolveSymlinks);
◆ request_loadPlugin
void VP1MainWindow::request_loadPlugin |
( |
| ) |
|
|
slot |
Definition at line 705 of file VP1MainWindow.cxx.
708 QString sharedlibsuffix =
"dylib";
710 QString sharedlibsuffix =
"so";
714 QString
filename = QFileDialog::getOpenFileName(
this,
"Select plugin file to load",
716 "VP1 plugin files (*VP1*."+sharedlibsuffix+
")",0,QFileDialog::DontResolveSymlinks);
◆ request_printChannel
void VP1MainWindow::request_printChannel |
( |
| ) |
|
|
slot |
Definition at line 1390 of file VP1MainWindow.cxx.
1396 QPrintDialog dialog(&printer,
this);
1402 painter.begin(&printer);
1403 painter.drawPixmap(0,0,pm);
◆ request_saveasConfig
void VP1MainWindow::request_saveasConfig |
( |
| ) |
|
|
slot |
Definition at line 667 of file VP1MainWindow.cxx.
669 QString
filename = QFileDialog::getSaveFileName(
this,
"Select configuration file to save",
671 "VP1 Configuration files (*.vp1)",0,QFileDialog::DontResolveSymlinks);
◆ request_saveChannelSnapshot
QString VP1MainWindow::request_saveChannelSnapshot |
( |
QString |
xLabel = "" | ) |
|
|
slot |
Definition at line 1335 of file VP1MainWindow.cxx.
1346 chnlname.replace(
' ',
'_');
1368 QString
filename = QFileDialog::getSaveFileName(0,
"Select target image file", guess,
1369 "Image (*.png *.bmp)",
1370 0,QFileDialog::DontResolveSymlinks);
1376 if (!(
filename.endsWith(
".png",Qt::CaseInsensitive)||
filename.endsWith(
".bmp",Qt::CaseInsensitive)))
◆ request_saveConfig
void VP1MainWindow::request_saveConfig |
( |
| ) |
|
|
slot |
◆ saveAllCurrentChannels
void VP1MainWindow::saveAllCurrentChannels |
( |
| ) |
|
|
slot |
Definition at line 1221 of file VP1MainWindow.cxx.
1231 if (allTabs.isEmpty()) {
1253 QString
filename = QFileDialog::getSaveFileName(0,
"Select target image file",
base,
1254 "Image (*.png *.bmp)",
1255 0,QFileDialog::DontResolveSymlinks);
1264 QStringList tab_save_files;
1273 QString channelname = widg->name().toLower();
1274 channelname.replace(
' ',
'_');
1281 QPixmap snap = widg->getSnapshot();
1282 if (snap.isNull()) {
1289 if (!(tabfilename.endsWith(
".png",Qt::CaseInsensitive)||tabfilename.endsWith(
".bmp",Qt::CaseInsensitive)))
1290 tabfilename +=
".png";
1293 snap.save(tabfilename);
1295 tab_save_files << tabfilename;
1301 QMessageBox::information(
this, tr(
"Snapshots saved."),
1302 "All tabs have been saved as snapshots in the following files:\n\n"+tab_save_files.join(
"\n"),
◆ selectedChannelChanged
Definition at line 637 of file VP1MainWindow.cxx.
643 groupBox_channelcontrols->setTitle(
"Controls: "+cw->
unique_name());
644 groupBox_channelcontrols->setEnabled(
true);
649 if (stackedWidget_customcontrols->indexOf(controller)==-1)
650 stackedWidget_customcontrols->addWidget(controller);
651 stackedWidget_customcontrols->setCurrentWidget(controller);
654 groupBox_channelcontrols->setTitle(
"Controls: no channel selected");
655 groupBox_channelcontrols->setEnabled(
false);
660 menubar->setEnabled(
true);
663 menubar->setEnabled(
true);
◆ setRunEvtNumber()
void VP1MainWindow::setRunEvtNumber |
( |
const int & |
runnumber, |
|
|
const unsigned long long & |
eventnumber, |
|
|
const unsigned & |
triggerType = 0 , |
|
|
const unsigned & |
time = 0 , |
|
|
const bool & |
printmessage = true |
|
) |
| |
Definition at line 974 of file VP1MainWindow.cxx.
996 QString expandedevtstr = evtstr
997 + QString(trighex.isEmpty()?QString(
""):
", triggerType: "+trighex)
1001 #ifdef BUILDVP1LIGHT
1002 setWindowTitle(
"VP1Light ["+expandedevtstr+
"]");
1004 setWindowTitle(
"VP1 (Virtual Point 1) ["+expandedevtstr+
"]");
1005 #endif // BUILDVP1LIGHT
1007 groupBox_event->setTitle(
"Event [loaded]");
1008 label_run_event->setText(
"["+evtstr+
"]");
◆ setupStatusBar()
void VP1MainWindow::setupStatusBar |
( |
| ) |
|
|
protected |
Definition at line 524 of file VP1MainWindow.cxx.
532 statusBar()->setStyleSheet(
"QStatusBar::item { border-width: 0 }");
◆ showMenu_loadConfFile
void VP1MainWindow::showMenu_loadConfFile |
( |
| ) |
|
|
protectedslot |
Definition at line 1542 of file VP1MainWindow.cxx.
1546 QMap<QString,QString> conffile2fullpath =
availableFiles(
".vp1",
"DATAPATH",
"",
"VP1CONFIGFILEPATH",
true );
1548 #ifndef BUILDVP1LIGHT
1549 if (conffile2fullpath.empty()) {
1554 QStringList
filelist(conffile2fullpath.keys());
1559 assert(conffile2fullpath.contains(
file));
1569 act_browse->setStatusTip(
"Browse filesystem for .vp1 config file");
◆ showMenu_loadConfFileItemSelected
void VP1MainWindow::showMenu_loadConfFileItemSelected |
( |
| ) |
|
|
protectedslot |
◆ showMenu_loadPlugin
void VP1MainWindow::showMenu_loadPlugin |
( |
| ) |
|
|
protectedslot |
Definition at line 1495 of file VP1MainWindow.cxx.
1501 if (plugins2fullpath.empty()) {
1506 QStringList pluglist(plugins2fullpath.keys());
1510 for(QString plug : pluglist) {
1512 assert(plugins2fullpath.contains(plug));
1513 QString
fullpath = plugins2fullpath[plug];
1514 if (currentpluginfiles.contains(
fullpath)) {
1515 act->setEnabled(
false);
1525 act_browse->setStatusTip(
"Browse filesystem for VP1 plugin files");
◆ showMenu_loadPluginItemSelected
void VP1MainWindow::showMenu_loadPluginItemSelected |
( |
| ) |
|
|
protectedslot |
◆ systemAddToMessageBox
void VP1MainWindow::systemAddToMessageBox |
( |
const QString & |
m | ) |
|
|
slot |
Definition at line 1037 of file VP1MainWindow.cxx.
1041 addToMessageBox(
"VP1MainWindow::systemAddToMessageBox Error: Only prints system messages!");
1044 if (!
sys->channel()) {
1045 addToMessageBox(
"VP1MainWindow::systemAddToMessageBox Error: System does not know its channel!");
◆ tabListChanged
void VP1MainWindow::tabListChanged |
( |
QStringList |
l | ) |
|
|
slot |
Definition at line 606 of file VP1MainWindow.cxx.
610 groupBox_cruise->setEnabled(
true);
613 groupBox_cruise->setEnabled(
false);
616 radioButton_cruise_tab->setEnabled(
true);
617 radioButton_cruise_both->setEnabled(
true);
619 if (radioButton_cruise_tab->isChecked()||radioButton_cruise_both->isChecked())
620 radioButton_cruise_event->setChecked(
true);
621 radioButton_cruise_tab->setEnabled(
false);
622 radioButton_cruise_both->setEnabled(
false);
◆ tabManager()
◆ unloadPlugin_continue
void VP1MainWindow::unloadPlugin_continue |
( |
| ) |
|
|
slot |
Definition at line 864 of file VP1MainWindow.cxx.
869 QMessageBox::critical(0,
"Error - problems unloading plugin file: "+
filename,
870 "Problems encountered while attempting to unload plugin file: "+
filename,QMessageBox::Ok,QMessageBox::Ok);
◆ updateCentralStackWidget
void VP1MainWindow::updateCentralStackWidget |
( |
| ) |
|
|
protectedslot |
Definition at line 1646 of file VP1MainWindow.cxx.
1648 QWidget * targetpage = tabWidget_central->count() ? page_tabwidget : page_instructions;
1649 if (stackedWidget_central->currentWidget() != targetpage)
1650 stackedWidget_central->setCurrentWidget(targetpage);
◆ updateEventControls
void VP1MainWindow::updateEventControls |
( |
| ) |
|
|
protectedslot |
◆ updateInputDirectoriesStatus
void VP1MainWindow::updateInputDirectoriesStatus |
( |
| ) |
|
|
protectedslot |
◆ updateTcpIcon
void VP1MainWindow::updateTcpIcon |
( |
| ) |
|
|
protectedslot |
Definition at line 570 of file VP1MainWindow.cxx.
573 m_statusbarlabel->setPixmap(QIcon(
l?
":/vp1/icons/icons/network_64x64.png":
":/vp1/icons/icons/network_disconnect_64x64.png")
576 :
"VP1 is presently NOT listening for incoming messages");
◆ userRequestedExit()
bool VP1MainWindow::userRequestedExit |
( |
| ) |
|
|
inline |
◆ userRequestedFiles()
QStringList VP1MainWindow::userRequestedFiles |
( |
| ) |
|
◆ m_action_addEventFile
QAction* VP1MainWindow::m_action_addEventFile |
|
protected |
◆ m_action_infoAboutLoadedPlugins
QAction* VP1MainWindow::m_action_infoAboutLoadedPlugins |
|
protected |
◆ m_action_openAbout
QAction* VP1MainWindow::m_action_openAbout |
|
protected |
◆ m_action_openUsersGuide
QAction* VP1MainWindow::m_action_openUsersGuide |
|
protected |
◆ m_action_openUsersSupport
QAction* VP1MainWindow::m_action_openUsersSupport |
|
protected |
◆ m_action_openVP1Site
QAction* VP1MainWindow::m_action_openVP1Site |
|
protected |
◆ m_actionAdd_empty_tab
QAction* VP1MainWindow::m_actionAdd_empty_tab |
|
protected |
◆ m_actionEnableExpertSettings
QAction* VP1MainWindow::m_actionEnableExpertSettings |
|
protected |
◆ m_actionSave_current_tabs
QAction* VP1MainWindow::m_actionSave_current_tabs |
|
protected |
◆ m_availEvents
◆ m_betweenevents
bool VP1MainWindow::m_betweenevents |
|
protected |
◆ m_blockallmessages
bool VP1MainWindow::m_blockallmessages |
|
protected |
◆ m_channelmanager
◆ m_currentconfigfile
QString VP1MainWindow::m_currentconfigfile |
|
protected |
◆ m_currentincomingdialog
◆ m_currentloadpluginpath
QString VP1MainWindow::m_currentloadpluginpath |
|
protected |
◆ m_currentsaveimagepath
QString VP1MainWindow::m_currentsaveimagepath |
|
protected |
◆ m_currentStream
QString VP1MainWindow::m_currentStream |
|
protected |
◆ m_currentunloadpluginfiles
QStringList VP1MainWindow::m_currentunloadpluginfiles |
|
protected |
◆ m_defaultfont
QFont VP1MainWindow::m_defaultfont |
|
protected |
◆ m_defaultfont_pixelsize
int VP1MainWindow::m_defaultfont_pixelsize |
|
protected |
◆ m_defaultfont_pointsize
double VP1MainWindow::m_defaultfont_pointsize |
|
protected |
◆ m_dummyemptycontroller
QWidget* VP1MainWindow::m_dummyemptycontroller |
|
protected |
◆ m_edEditor
◆ m_eventnumber
unsigned long long VP1MainWindow::m_eventnumber |
|
protected |
◆ m_inputdiractions
QList<QAction*> VP1MainWindow::m_inputdiractions |
|
protected |
◆ m_inputdirstatuses
◆ m_menu_changeFontSize
QMenu* VP1MainWindow::m_menu_changeFontSize |
|
protected |
◆ m_menu_changeStyle
QMenu* VP1MainWindow::m_menu_changeStyle |
|
protected |
◆ m_menu_loadConfFile
QMenu* VP1MainWindow::m_menu_loadConfFile |
|
protected |
◆ m_menu_loadPlugin
QMenu* VP1MainWindow::m_menu_loadPlugin |
|
protected |
◆ m_messages_blockedexactmessages
◆ m_messages_blockedsenders
QList<QString> VP1MainWindow::m_messages_blockedsenders |
|
protected |
◆ m_mustquit
bool VP1MainWindow::m_mustquit |
|
protected |
◆ m_mutex
QMutex* VP1MainWindow::m_mutex |
|
protected |
◆ m_plugindialog
◆ m_requestqueue
◆ m_runnumber
int VP1MainWindow::m_runnumber |
|
protected |
◆ m_scheduler
◆ m_settingsfile
const QString VP1MainWindow::m_settingsfile |
|
protected |
◆ m_statusbarlabel
QLabel* VP1MainWindow::m_statusbarlabel |
|
protected |
◆ m_streamMenuUpdater
◆ m_tabmanager
◆ m_tcpserver
◆ m_timestamp
unsigned VP1MainWindow::m_timestamp |
|
protected |
◆ m_userRequestedExit
bool VP1MainWindow::m_userRequestedExit |
|
protected |
◆ m_userRequestedFiles
QStringList VP1MainWindow::m_userRequestedFiles |
|
protected |
◆ progressbar
QProgressBar* VP1MainWindow::progressbar |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
void updateCentralStackWidget()
std::string replace(std::string s, const std::string &s2, const std::string &s3)
void showMenu_loadPluginItemSelected()
void selectedChannelChanged(IVP1ChannelWidget *)
static bool fileExistsAndReadable(const std::string &)
QAction * m_actionEnableExpertSettings
QString m_currentconfigfile
void launch3DstereoEditor()
QAction * m_action_openAbout
void changeStyleActionTriggered()
path
python interpreter configuration --------------------------------------—
void helperAddToMessageBox(const QString &)
QQueue< VP1ExternalRequest > m_requestqueue
VP1ChannelManager * m_channelmanager
bool unloadPluginFile(QString filename)
void help_openUserGuide()
void help_openVP1WebSite()
QString getIconLocation(const QString &channelname, const bool &isbasename=true)
QMap< QString, QString > availablePluginFiles() const
QPixmap getSingleChannelCustomSnapshot(IVP1ChannelWidget *tab, int width=0)
void launchStereoEditorCurrentTab()
void tabListChanged(QStringList)
void setTabsList(QStringList listNames)
bool listen(QString &err, const quint16 &port=4747)
std::string dirname(std::string name)
void loadPluginFile(QString filename)
QMap< QString, QString > availableFiles(const QString &extension, const QString &pathvar, const QString &instareasubdir, const QString &extradirenvvar, bool currentdir=false) const
void setCruiseMode(const CruiseMode &)
void makeAllChannelsEventDisplay()
QMenu * m_menu_changeStyle
void finishedIncomingDialog()
VP1DirStatuses m_inputdirstatuses
IVP1ChannelWidget * addChannelToTab(QString channelbasename, QString tabname)
static QString expertSettingValue(const QString &type, const QString &name)
QStringList availableSourceDirectories() const
void processEnqueuedRequests()
void saveAllCurrentChannels()
void addPixmapList(QList< QPixmap > &list, QStringList &listNames)
def timer(name, disabled=False)
void request_loadConfig()
QStringList currentPluginFiles() const
void help_openUserSupport()
void addToMessageBox(const QString &, const QString &extrastyleopts="", const QString &title="", const QString &titleextrastyleopts="")
void changeFontSizeActionTriggered()
const QString m_settingsfile
VP1StreamMenuUpdater * m_streamMenuUpdater
QList< VP1EventFile > freshEvents() const
QString suggestNewTabName(QString oldtabname) const
void getAllChannelsIntoSnapshots(QList< QPixmap > &list, QStringList &listNames)
void updateInputDirectoriesStatus()
VP1PluginDialog * m_plugindialog
string inputdir
define the input files
def save(self, fileName="./columbo.out")
void setNextRequestedEventFile(const QString &)
static bool expertSettingIsSet(const QString &type, const QString &name)
QMenu * m_menu_changeFontSize
void loadConfigurationFromFile(QString file)
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
void showMenu_loadConfFile()
static const char * prefix_msg()
static QString defaultFileSelectDirectory()
void unloadPlugin_continue()
void request_cruisemodechange()
bool hasTab(QString) const
QStringList channelsInPluginFile(QString filename) const
static bool environmentVariableIsOn(const QString &name)
QStringList basename2UniqueNames(QString basename) const
unsigned long long m_eventnumber
bool okToProceedToNextEvent() const
QLabel * m_statusbarlabel
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
std::pair< std::vector< unsigned int >, bool > res
QStringList m_userRequestedFiles
void request_channelInformation()
VP1AvailEvents * m_availEvents
QWidget * m_dummyemptycontroller
VP1IncomingMessageDialog * m_currentincomingdialog
void request_loadPlugin()
void loadConfigurationFromFile(QString filename, const QMap< QString, QString > &availableplugins)
void setCurrentEvent(int run, int event)
QStringList m_currentunloadpluginfiles
void removeChannel(QString channeluniquename)
QString loadPluginFile(QString filename)
void showMenu_loadPlugin()
QAction * m_action_openUsersSupport
IVP1ChannelWidget * selectedChannelWidget() const
QList< IVP1ChannelWidget * > allChannels() const
QString m_currentloadpluginpath
QString m_currentsaveimagepath
QAction * m_action_addEventFile
void showMenu_loadConfFileItemSelected()
int m_defaultfont_pixelsize
QAction * m_actionSave_current_tabs
void addNewTab(QString, const int &index=-1)
void dropOutOfFullScreen()
QProgressBar * progressbar
static void messageVerbose(const QString &)
QAction * m_action_openUsersGuide
QAction * m_actionAdd_empty_tab
QMenu * m_menu_loadConfFile
VP1EventDisplayEditor * m_edEditor
void request_addEmptyTab()
QString currentSourceDir() const
QWidget * getController(IVP1ChannelWidget *)
void setSourceDir(QString)
static void messageDebug(const QString &)
std::string getenv(const std::string &variableName)
get an environment variable
def time(flags, cells_name, *args, **kw)
static void message(const QString &, IVP1System *sys=0)
void saveConfigurationToFile(QString filename, const bool &askonoverride=true)
filelist
print ("Checking files %s..." % fullfile)
void request_printChannel()
void setSelectedDockWidget(VP1DockWidget *dw=0)
QString request_saveChannelSnapshot(QString xLabel="")
QAction * m_action_openVP1Site
VP1ExecutionScheduler * m_scheduler
VP1TabManager * m_tabmanager
void updateEventControls()
QMenu * m_menu_loadPlugin
void receivedExternalRequest(VP1ExternalRequest)
double m_defaultfont_pointsize
QList< QAction * > m_inputdiractions
void inputDirectoryActionTriggered()
void request_saveasConfig()
QList< QString > m_messages_blockedsenders
void quickSetupTriggered()
void pluginDialogClosed()
QString channelToTab(IVP1ChannelWidget *)
QList< VP1ExternalRequest > m_messages_blockedexactmessages