90: QMainWindow(parent),
103{
104 setupUi(this);
105
107
108 #if defined BUILDVP1LIGHT
110 #else
112 #endif
113
114 if (!checkShowAllCruiseAndEventControls) {
115 pushButton_eventseek->setVisible(false);
116 groupBox_cruise->setVisible(false);
117 }
118
122 }
123
124
129 menubar->addAction(
menu_file->menuAction());
131
133 }
134
135 #ifndef BUILDVP1LIGHT
136 pushButton_previousevent->setVisible(false);
137 pushButton_eventselect->setVisible(false);
138 #else
139 pushButton_eventselect->setVisible(true);
140 pushButton_eventselect->setText("Event: 0/0");
141 pushButton_eventselect->setEnabled(false);
142 pushButton_previousevent->setEnabled(false);
143
144
145
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");
159 #endif
160
162
163
164 VP1AvailEvtsLocalDir* availLocal =
dynamic_cast<VP1AvailEvtsLocalDir*
>(
m_availEvents);
165
166 QStringList inputdirs;
167 if (availLocal)
169
170 if (availLocal&&!inputdirs.isEmpty()) {
171
176 QMenu * menu_inputdir = new QMenu(menubar);
177 menu_inputdir->setObjectName("menu_inputdir");
178 menu_inputdir->setTitle("&Stream");
179
180 menubar->addAction(menu_inputdir->menuAction());
181
182 QActionGroup * inputdir_actiongroup = new QActionGroup(menu_inputdir);
183 QAction*action_inputdir_current(0);
184 for (QString inputdir : inputdirs) {
187 QString
dirname = QDir(inputdir).dirName();
188 QAction * action_inputdir = new QAction(this);
189 action_inputdir->setObjectName(
"action_inputdir_"+
dirname);
190 action_inputdir->setData(inputdir);
191 action_inputdir->setStatusTip("Get input files from: "+inputdir);
192 action_inputdir->setCheckable(true);
193
194 if (currentdir==inputdir)
195 action_inputdir_current = action_inputdir;
196 menu_inputdir->addAction(action_inputdir);
197 inputdir_actiongroup->addAction(action_inputdir);
200 }
201 if (action_inputdir_current) {
202 action_inputdir_current->blockSignals(true);
203 action_inputdir_current->setChecked(true);
204 action_inputdir_current->blockSignals(false);
205 }
206
207
210 QString(),
211 true,
212 false);
213
216
217
218 QTimer *
timer =
new QTimer(
this);
221 }
222
223
224
228
229
230
231
232
233 for (
int i=0;
i<stackedWidget_central->count();++
i)
234 stackedWidget_central->widget(i)->layout()->setContentsMargins(0,0,0,0);
235
237 frame_instructions->setFrameShape(QFrame::StyledPanel);
238
239
240 #ifndef BUILDVP1LIGHT
242 #else
244 #endif
249
250
255 else
257
258
262
263
264
267
269
270 connect(pushButton_channelfullscreen,SIGNAL(clicked()),
m_tabmanager,SLOT(showCurrentChannelFullScreen()));
275
276
277
285 connect(action_exit_VP1,SIGNAL(triggered(
bool)),
this,SLOT(close()));
286
287
291 menuConfiguration->addSeparator();
292
295
296
297
299
301 QActionGroup * styleGroup = new QActionGroup(this);
302 QAction * laststyleact(0);
303 bool foundplastique=false;
305 QString defaultstyle=
s.value(
"style/defaultstyle",
"Fusion").toString();
306 for (QString style : QStyleFactory::keys() ) {
308 act->setStatusTip("Change application style to "+style);
310 act->setCheckable(true);
311 styleGroup->addAction(act);
312 laststyleact=act;
313 if (act->text()==defaultstyle) {
314 act->setChecked(true);
315 QApplication::setStyle(QStyleFactory::create(act->text()));
316 foundplastique=true;
317 }
318 }
319 if (!foundplastique) {
320 laststyleact->setChecked(true);
321 QApplication::setStyle(QStyleFactory::create(laststyleact->text()));
322 }
323
324 int savedgoal = 0;
326 savedgoal =
s.value(
"font/pixelsize_diff", 0).toInt();
327 else
328 savedgoal =
s.value(
"font/pointsize_relativepercent", 0).toInt();
329
331 QList<int> fontoptions;
333 fontoptions <<15<<10<<+5<<+3<<+2<<+1<<0<<-1<<-2<<-3<<-5<<-10<<-20<<-30;
334 else
335 fontoptions <<150<<100<<50<<30<<20<<10<<5<<0<<-5<<-10<<-20<<-30<<-50;
336
337 QActionGroup * fontGroup = new QActionGroup(this);
338 bool foundsavedgoal(false);
339 QAction * normalfontact(0);
340 for (int fontopt : fontoptions) {
342 continue;
343 QString
text = (fontopt==0?
"normal": (fontopt>0?
"+":
"")+QString::number(fontopt)+(
m_defaultfont_pointsize < 0.0?
" pixels" :
"%"));
345 act->setStatusTip("Change overall font size of application to "+text);
346 act->setData(fontopt);
347 act->setCheckable(true);
348 fontGroup->addAction(act);
350 if (fontopt==0)
351 normalfontact=act;
352 if (savedgoal==fontopt) {
353 act->setChecked(true);
355 foundsavedgoal=true;
356 }
357 }
358 if (!foundsavedgoal) {
359 normalfontact->setChecked(true);
360 }
361
362
365 menuConfiguration->addSeparator();
370
371
372 #ifdef BUILDVP1LIGHT
373 menuConfiguration->addSeparator();
377 #endif
378
379
381 #ifdef BUILDVP1LIGHT
382 connect(pushButton_previousevent,SIGNAL(clicked()),
this,SLOT(goToPreviousEvent()));
383 connect(pushButton_eventselect,SIGNAL(clicked()),
this,SLOT(chooseEvent()));
384 #endif
385
386
389
395
396
401
402
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();
412
416
421
422
423 #ifndef BUILDVP1LIGHT
424 menubar->setEnabled(false);
425 #endif
426}
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
QString request_saveChannelSnapshot(QString xLabel="")
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
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)