CEDRIC  Revision_backup-2009-02
EventDisplay/src/MainWindow.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 2008 Boris Iven, Max Hermann
4  *
5  * This file is part of the "CEDRIC Event Display" application.
6  *
7  *****************************************************************************/
8 
9 #ifndef MAINWINDOW_H
10 #define MAINWINDOW_H
11 
12 #include <QtGui/QMainWindow>
13 #include <QtCore/QList>
14 #include "ui_MainWindow.h"
15 class QDockWidget;
16 class QAction;
17 class QLabel;
18 
19 #include "EventViewerWidget.h"
20 #include "SetupTreeWidget.h"
21 class EventMultiViewer;
23 class EventNavigator;
24 class PhastScene;
25 
26 
27 #include <osg/ref_ptr>
28 #include <osg/Switch>
29 
30 
31 
32 #define USE_EVENTTREEWIDGET
33 //#define FILL_EVENTTREEWIDGET_ON_LOAD
34 
35 
37 
41 class MainWindow : public QMainWindow, public Ui_MainWindowClass
42 {
43  Q_OBJECT
44 
45 public:
46  MainWindow( QWidget *parent = 0 );
47  virtual ~MainWindow();
48 
49 public slots:
51  void openRootFile( const QString& filename="" );
52 
54  void reload();
55 
57  void setPositionStatus( float x, float y, float z );
58 
60 
66  void selectEvent( int index, bool showProgress=false );
67 
69  void updateNavigator();
70 
71 protected slots:
72  void exportAction( QAction* ea );
73  void optionShowOnlyParticles( bool b );
74  void optionShowOnlyPhysicalTracks( bool b );
75 
76 private slots:
77  void about();
78  void help();
79 
80 protected:
82  void connectDocks( bool enable=true );
83 
85  void updateViewers();
86 
88  bool buildSetup();
89 
91  bool loadSetup( int run );
92 
93  void resizeEvent( QResizeEvent* event );
94  void moveEvent( QMoveEvent* event );
95 
96 private:
97  PhastScene* m_phastScene;
98 
99  int m_currentRun;
100  int m_currentSetup;
101  int m_selectedEvent;
102  EventList m_eventList;
103 
104  EventMultiViewer* multiViewer;
105 
106  EventSelectorWidget* eventSelector;
107 
108  EventNavigator* eventNavigator;
109 
110  QLabel* infoLabel;
111 };
112 
113 #endif // MAINWINDOW_H
void moveEvent(QMoveEvent *event)
Definition: EventDisplay/src/MainWindow.cpp:181
bool buildSetup()
Instantiate PhastParser and build setup tree and scenegraph, returns false on failure.
Definition: EventDisplay/src/MainWindow.cpp:265
void optionShowOnlyParticles(bool b)
Definition: EventDisplay/src/MainWindow.cpp:186
void selectEvent(int index, bool showProgress=false)
Load specific event from EventList.
Definition: EventDisplay/src/MainWindow.cpp:484
void updateNavigator()
Call EventNavigator::init() which creates Signatures for all events and shows overview map (may take ...
Definition: EventDisplay/src/MainWindow.cpp:197
void connectDocks(bool enable=true)
Make connections from and to all docks when enable==true, else kills all connections.
Definition: EventDisplay/src/MainWindow.cpp:230
std::vector< EventInfo > EventList
Definition: EventInfo.h:60
Combine a set of EventViewerWidget's to a 'perspective' (see enum Layouts) and provide user-interface...
Definition: EventMultiViewer.h:54
Definition: EventNavigator.h:30
void exportAction(QAction *ea)
Definition: EventDisplay/src/MainWindow.cpp:222
void openRootFile(const QString &filename="")
Open a ROOT tree mDST from disk, if no filename is given a file dialog is shown.
Definition: EventDisplay/src/MainWindow.cpp:287
MainWindow(QWidget *parent=0)
Definition: EventDisplay/src/MainWindow.cpp:53
bool loadSetup(int run)
Load setup for specified run (calls buildSetup() internally)
Definition: EventDisplay/src/MainWindow.cpp:432
Definition: EventSelectorWidget.h:16
void reload()
Reload a ROOT file with curent selected event and configuration.
Definition: EventDisplay/src/MainWindow.cpp:416
Scenegraph holding static and dynamic Phast geometry.
Definition: PhastScene.h:32
void setPositionStatus(float x, float y, float z)
Set statusbar position entry.
Definition: EventDisplay/src/MainWindow.cpp:567
void resizeEvent(QResizeEvent *event)
Definition: EventDisplay/src/MainWindow.cpp:176
virtual ~MainWindow()
Definition: EventDisplay/src/MainWindow.cpp:170
void optionShowOnlyPhysicalTracks(bool b)
Definition: EventDisplay/src/MainWindow.cpp:191
MainWindow for QtOsgEventDisplay application.
Definition: EventDisplay/src/MainWindow.h:41
void updateViewers()
Update setup and event nodes of active viewers.
Definition: EventDisplay/src/MainWindow.cpp:254