00001 #ifndef STAR_GEOMBROWSER
00002 #define STAR_GEOMBROWSER
00003
00004 #include <QMainWindow>
00005 #include <QString>
00006
00007 class TFile;
00008 class TObject;
00009 class St_geant_Maker;
00010 class StChain;
00011 class QComboBox;
00012 class TVirtualViewer3D;
00013 class StarGeomTreeWidget;
00014 class TQtWidget;
00015 class StarGeomTreeWidget;
00016 class TQtRootCommandCombo;
00017 class TQtRangeControl;
00018 class TextEdit;
00019 class QAction;
00020 class QStatusBar;
00021 class StQtDelayRedrawTimer;
00022 class StDraw3D;
00023
00024 class GeomBrowser : public QMainWindow {
00025 Q_OBJECT
00026 private:
00027 StarGeomTreeWidget *fTreeWidget;
00028 TFile *fFile;
00029 StChain *fChain;
00030 St_geant_Maker *fGeant;
00031 QComboBox *fGeometrySelector;
00032 TVirtualViewer3D *fCurrentViewer;
00033 QString fOpenFileName;
00034 bool fGeometryLoaded;
00035 TQtWidget *fSingleVolumeCanvas;
00036 TQtWidget *fComplexVolumeCanvas;
00037 StDraw3D *fEventDisplay;
00038 TQtRootCommandCombo *fRootCommand;
00039 TextEdit *fTextEdit;
00040
00041 TQtWidget *fCurrentWidget;
00042
00043 QString fSaveFileName;
00044
00045 QAction *fFile_New, *fFile_Open, *fFile_Reload, *fFile_Save, *fFile_SaveAs
00046 , *fFile_Print, *fFile_Exit;
00047 QAction *fView_Coin3DAction, *fView_GLAction;
00048 QAction *fEditGeoSrc;
00049 QStatusBar *fStatusBar;
00050 TQtRangeControl *fDepthControl;
00051 StQtDelayRedrawTimer *fDelayDrawTimer;
00052
00053 protected:
00054 static int Geant3Init;
00055
00056 protected:
00057 void CleanGeoManager();
00058 St_geant_Maker &Geant();
00059 void Init();
00060 void CreateActions();
00061 void CreateMenu();
00062 void CreateToolBar();
00063 void CreateStatusBar();
00064 void CreateGuiLayout();
00065 void Connect();
00066
00067
00068 public:
00069 GeomBrowser(QWidget *parent=0);
00070 virtual ~GeomBrowser();
00071
00072 public slots:
00073 void fileOpenMacro( const QString &fileName );
00074 void fileOpenRoot ( const QString &fileName );
00075 void fileOpenZebra( const QString &fileName );
00076 void fileOpenInventor( const QString &fileName );
00077 void SelectGeometry(const QString &geomTag);
00078 void STAR_geometry_activated( const QString &geoVersion );
00079 void DrawObject(TObject *rootObject=0,bool expanded=true);
00080 void ObjectSelected( TObject *obj, const QPoint &);
00081 void ViewerDestroyed();
00082
00083 public slots:
00084 void RemakeGeomSlot(const QString &);
00085 void fileOpenSlot();
00086 void fileReloadSlot();
00087 void fileSaveSlot();
00088 void fileSaveAsSlot();
00089 void filePrintSlot();
00090 void fileExitSlot();
00091
00092 void viewGLSlot();
00093 TVirtualViewer3D *viewCoin3DSlot();
00094
00095 };
00096
00097 #endif