PSQt/include/WdgGeoTree.h

Go to the documentation of this file.
00001 #ifndef WDGGEOTREE_H
00002 #define WDGGEOTREE_H
00003 
00004 //#include "PSQt/WdgImage.h"
00005 //#include "PSQt/WdgFile.h"
00006 
00007 #include "PSQt/GeoTree.h"
00008 
00009 #include "PSQt/Frame.h"
00010 #include "PSCalib/GeometryAccess.h"
00011 #include "PSCalib/GeometryObject.h"
00012 #include <boost/shared_ptr.hpp>
00013 
00014 #include <Qt>
00015 #include <QtGui>
00016 #include <QtCore>
00017 
00018 namespace PSQt {
00019 
00020 typedef boost::shared_ptr<PSCalib::GeometryObject> shpGO;
00021 
00022 class GeoTree;
00023 
00024 /**
00025  *  @ingroup PSQt
00026  *
00027  *  @brief Widget to display and edit geometry tree.
00028  * 
00029  *  WdgGeoTree is a sub-class of Frame (QWidget)
00030  *  GeoTree is a sub-class of QTreeView
00031  *
00032  *  Geometry tree for input file is displayed in the window.
00033  *  GeoTree emits signal "selectedGO(shpGO&)" when the geometry object is selected.
00034  *
00035  *
00036  *  This software was developed for the LCLS project.  If you use all or 
00037  *  part of it, please give an appropriate acknowledgment.
00038  *
00039  *  @see GUIMain
00040  *
00041  *  @version $Id: WdgGeoTree.h 11039 2015-12-01 01:18:58Z dubrovin@SLAC.STANFORD.EDU $
00042  *
00043  *  @author Mikhail Dubrovin
00044  */
00045 
00046 class WdgGeoTree : public Frame
00047 {
00048  Q_OBJECT // macro is needed for connection of signals and slots
00049 
00050  public:
00051 
00052   WdgGeoTree( QWidget *parent = 0
00053             , const std::string& gfname = "/reg/g/psdm/detector/alignment/cspad/geo-cspad-test-2-end.data"
00054             , const unsigned& pbits=255);
00055 
00056     void resizeEvent     (QResizeEvent *event = 0) ;
00057     void moveEvent       (QMoveEvent   *event = 0) ;
00058     void mousePressEvent (QMouseEvent  *event = 0) ;
00059     void closeEvent      (QCloseEvent  *event = 0) ;
00060 
00061     QTreeView* get_view() { return m_view; };
00062     GeoTree* get_geotree() { return m_geotree; };
00063     PSCalib::GeometryAccess* geoacc();
00064     void showTips() ;
00065 
00066  private:
00067     unsigned    m_pbits;
00068     GeoTree*    m_geotree;
00069     QTreeView*  m_view;
00070     inline const char* _name_(){return "WdgGeoTree";}
00071 };
00072 
00073 } // namespace PSQt
00074 
00075 #endif // WDGGEOTREE_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7