109: QMainWindow(parent),
122{
123 setupUi(this);
124
126
127 #if defined BUILDVP1LIGHT
129 #else
131 #endif
132
133 if (!checkShowAllCruiseAndEventControls) {
134 pushButton_eventseek->setVisible(false);
135 groupBox_cruise->setVisible(false);
136 }
137
141 }
142
143
148 menubar->addAction(
menu_file->menuAction());
150
152 }
153
154 #ifndef BUILDVP1LIGHT
155 pushButton_previousevent->setVisible(false);
156 pushButton_eventselect->setVisible(false);
157 #else
158 pushButton_eventselect->setVisible(true);
159 pushButton_eventselect->setText("Event: 0/0");
160 pushButton_eventselect->setEnabled(false);
161 pushButton_previousevent->setEnabled(false);
162
163
164
165 pushButton_quicksetup_trackingstudies->setEnabled(false);
166 pushButton_quicksetup_trackingstudies->setToolTip("Not available in VP1Light");
167 pushButton_quicksetup_calostudies->setEnabled(false);
168 pushButton_quicksetup_calostudies->setToolTip("Not available in VP1Light");
169 action_quicklaunch_Tracking_studies->setEnabled(false);
170 action_quicklaunch_Tracking_studies->setToolTip("Not available in VP1Light");
171 action_quicklaunch_Calo_studies->setEnabled(false);
172 action_quicklaunch_Calo_studies->setToolTip("Not available in VP1Light");
173 action_quicklaunch_Storegate_browser->setEnabled(false);
174 action_quicklaunch_Storegate_browser->setToolTip("Not available in VP1Light");
175 action_quicklaunch_trackcalo_commis->setEnabled(false);
176 action_quicklaunch_trackcalo_commis->setToolTip("Not available in VP1Light");
178 #endif
179
181
182
183 VP1AvailEvtsLocalDir* availLocal =
dynamic_cast<VP1AvailEvtsLocalDir*
>(
m_availEvents);
184
185 QStringList inputdirs;
186 if (availLocal)
188
189 if (availLocal&&!inputdirs.isEmpty()) {
190
192 if (currentdir.endsWith("/"))
193 currentdir.chop(1);
195 QMenu * menu_inputdir = new QMenu(menubar);
196 menu_inputdir->setObjectName("menu_inputdir");
197 menu_inputdir->setTitle("&Stream");
198
199 menubar->addAction(menu_inputdir->menuAction());
200
201 QActionGroup * inputdir_actiongroup = new QActionGroup(menu_inputdir);
202 QAction*action_inputdir_current(0);
203 for (QString inputdir : inputdirs) {
206 QString
dirname = QDir(inputdir).dirName();
207 QAction * action_inputdir = new QAction(this);
208 action_inputdir->setObjectName(
"action_inputdir_"+
dirname);
209 action_inputdir->setData(inputdir);
210 action_inputdir->setStatusTip("Get input files from: "+inputdir);
211 action_inputdir->setCheckable(true);
212
213 if (currentdir==inputdir)
214 action_inputdir_current = action_inputdir;
215 menu_inputdir->addAction(action_inputdir);
216 inputdir_actiongroup->addAction(action_inputdir);
219 }
220 if (action_inputdir_current) {
221 action_inputdir_current->blockSignals(true);
222 action_inputdir_current->setChecked(true);
223 action_inputdir_current->blockSignals(false);
224 }
225
226
229 QString(),
230 true,
231 false);
232
235
236
237 QTimer *
timer =
new QTimer(
this);
240 }
241
242
243
247
248
249
250
251
252 for (
int i=0;
i<stackedWidget_central->count();++
i)
253 stackedWidget_central->widget(i)->layout()->setContentsMargins(0,0,0,0);
254
256 frame_instructions->setFrameShape(QFrame::StyledPanel);
257
258
259 #ifndef BUILDVP1LIGHT
261 #else
263 #endif
268
269
274 else
276
277
281
282
283
286
288
289 connect(pushButton_channelfullscreen,SIGNAL(clicked()),
m_tabmanager,SLOT(showCurrentChannelFullScreen()));
294
295
296
304 connect(action_exit_VP1,SIGNAL(triggered(
bool)),
this,SLOT(close()));
305
306
310 menuConfiguration->addSeparator();
311
314
315
316
318
320 QActionGroup * styleGroup = new QActionGroup(this);
321 QAction * laststyleact(0);
322 bool foundplastique=false;
324 QString defaultstyle=
s.value(
"style/defaultstyle",
"Fusion").toString();
325 for (QString style : QStyleFactory::keys() ) {
327 act->setStatusTip("Change application style to "+style);
329 act->setCheckable(true);
330 styleGroup->addAction(act);
331 laststyleact=act;
332 if (act->text()==defaultstyle) {
333 act->setChecked(true);
334 QApplication::setStyle(QStyleFactory::create(act->text()));
335 foundplastique=true;
336 }
337 }
338 if (!foundplastique) {
339 laststyleact->setChecked(true);
340 QApplication::setStyle(QStyleFactory::create(laststyleact->text()));
341 }
342
343 int savedgoal = 0;
345 savedgoal =
s.value(
"font/pixelsize_diff", 0).toInt();
346 else
347 savedgoal =
s.value(
"font/pointsize_relativepercent", 0).toInt();
348
350 QList<int> fontoptions;
352 fontoptions <<15<<10<<+5<<+3<<+2<<+1<<0<<-1<<-2<<-3<<-5<<-10<<-20<<-30;
353 else
354 fontoptions <<150<<100<<50<<30<<20<<10<<5<<0<<-5<<-10<<-20<<-30<<-50;
355
356 QActionGroup * fontGroup = new QActionGroup(this);
357 bool foundsavedgoal(false);
358 QAction * normalfontact(0);
359 for (int fontopt : fontoptions) {
361 continue;
362 QString
text = (fontopt==0?
"normal": (fontopt>0?
"+":
"")+QString::number(fontopt)+(
m_defaultfont_pointsize < 0.0?
" pixels" :
"%"));
364 act->setStatusTip("Change overall font size of application to "+text);
365 act->setData(fontopt);
366 act->setCheckable(true);
367 fontGroup->addAction(act);
369 if (fontopt==0)
370 normalfontact=act;
371 if (savedgoal==fontopt) {
372 act->setChecked(true);
374 foundsavedgoal=true;
375 }
376 }
377 if (!foundsavedgoal) {
378 normalfontact->setChecked(true);
379 }
380
381
384 menuConfiguration->addSeparator();
389
390
391 #ifdef BUILDVP1LIGHT
392 menuConfiguration->addSeparator();
396 #endif
397
398
400 #ifdef BUILDVP1LIGHT
401 connect(pushButton_previousevent,SIGNAL(clicked()),
this,SLOT(goToPreviousEvent()));
402 connect(pushButton_eventselect,SIGNAL(clicked()),
this,SLOT(chooseEvent()));
403 #endif
404
405
408
414
415
420
421
422 QMenu* menu_help = new QMenu(menubar);
423 menu_help->setObjectName("menu_help");
424 menu_help->setTitle("&Help");
425 menubar->addAction(menu_help->menuAction());
429 menu_help->addSeparator();
431
435
440
441
442 #ifndef BUILDVP1LIGHT
443 menubar->setEnabled(false);
444 #endif
445}
const QString & currentSourceDir() const
const QStringList & availableSourceDirectories() const
void helperAddToMessageBox(const QString &)
void updateCentralStackWidget()
void quickSetupTriggered()
void help_openUserSupport()
int m_defaultfont_pixelsize
QMenu * m_menu_changeFontSize
VP1EventDisplayEditor * m_edEditor
VP1AvailEvents * m_availEvents
void receivedExternalRequest(VP1ExternalRequest)
void saveAllCurrentChannels()
double m_defaultfont_pointsize
void showMenu_loadPlugin()
VP1ChannelManager * m_channelmanager
VP1TabManager * m_tabmanager
QString m_currentsaveimagepath
QString m_currentloadpluginpath
VP1IncomingMessageDialog * m_currentincomingdialog
void request_saveasConfig()
QAction * m_action_openUsersSupport
QMenu * m_menu_loadPlugin
void request_cruisemodechange()
QWidget * m_dummyemptycontroller
const QString m_settingsfile
void updateEventControls()
QAction * m_actionSave_current_tabs
QAction * m_action_openUsersGuide
void changeStyleActionTriggered()
QMenu * m_menu_loadConfFile
unsigned long long m_eventnumber
void help_openUserGuide()
QAction * m_action_openVP1Site
QAction * m_actionAdd_empty_tab
QString request_saveChannelSnapshot(const QString &xLabel="")
void inputDirectoryActionTriggered()
VP1PluginDialog * m_plugindialog
VP1DirStatuses m_inputdirstatuses
void request_printChannel()
QList< QAction * > m_inputdiractions
QAction * m_actionEnableExpertSettings
VP1StreamMenuUpdater * m_streamMenuUpdater
void request_channelInformation()
VP1ExecutionScheduler * m_scheduler
void makeAllChannelsEventDisplay()
QAction * m_action_addEventFile
void changeFontSizeActionTriggered()
void selectedChannelChanged(IVP1ChannelWidget *)
void request_addEmptyTab()
void tabListChanged(const QStringList &)
QAction * m_action_openAbout
void launch3DstereoEditor()
void updateInputDirectoriesStatus()
void showMenu_loadConfFile()
void help_openVP1WebSite()
QMenu * m_menu_changeStyle
static bool environmentVariableIsOn(const QString &name)
static bool expertSettingIsSet(const QString &type, const QString &name)
static QString defaultFileSelectDirectory()
str inputdir
define the input files
timer(name, disabled=False)
std::string dirname(std::string name)