PSQt/include/WdgDirTree.h

Go to the documentation of this file.
00001 #ifndef WDGDIRTREE_H
00002 #define WDGDIRTREE_H
00003 
00004 #include "PSQt/Frame.h"
00005 //#include <QVBox>
00006 //#include <QWidget>
00007 //#include <QLabel>
00008 //#include <QSlider>
00009 //#include <QPushButton>
00010 
00011 #include <Qt>
00012 #include <QtGui>
00013 #include <QtCore>
00014 
00015 //#include "PSQt/WdgImage.h"
00016 #include "PSQt/WdgFile.h"
00017 
00018 namespace PSQt {
00019 
00020 /**
00021  *  @ingroup PSQt
00022  * 
00023  *  @brief Wiget works with file directory tree (Is not used in current project).
00024  * 
00025  *  @code
00026  *  @endcode
00027  *
00028  *  This software was developed for the LCLS project.  If you use all or 
00029  *  part of it, please give an appropriate acknowledgment.
00030  *
00031  *  @see 
00032  *
00033  *  @version $Id: WdgDirTree.h 9841 2015-03-26 18:35:44Z dubrovin@SLAC.STANFORD.EDU $
00034  *
00035  *  @author Mikhail Dubrovin
00036  */
00037 
00038 //class WdgDirTree : public QWidget
00039 class WdgDirTree : public Frame
00040 {
00041  Q_OBJECT // macro is needed for connection of signals and slots
00042 
00043  public:
00044     WdgDirTree( QWidget *parent = 0, 
00045                 const std::string& dir_top = "/reg/g/psdm/detector/alignment/cspad/calib-cxi-ds1-2014-05-15", 
00046                 const unsigned& pbits=0);
00047 
00048     void showTips() ;
00049 
00050     void resizeEvent     (QResizeEvent *event = 0) ;
00051     void closeEvent      (QCloseEvent  *event = 0) ;
00052     void moveEvent       (QMoveEvent   *event = 0) ;
00053     void mousePressEvent (QMouseEvent  *event = 0) ;
00054 
00055  public slots:
00056 
00057     void onButExit() ;
00058 
00059  private:
00060 
00061     std::string         m_dir_top;
00062     QTreeView*          m_view;
00063     QStandardItemModel* m_model;
00064     unsigned            m_pbits;
00065 
00066     inline const char* _name_(){return "WdgDirTree";}
00067     void makeTreeModel();
00068     void updateTreeModel(const std::string& dir_top = "./");
00069     void fillTreeModel(const std::string& dir_top = "./", QStandardItem* item=0, const unsigned& level=0, const unsigned& pbits=0);
00070     void fillTreeModelTest();
00071 };
00072 
00073 } // namespace PSQt
00074 
00075 #endif // WDGDIRTREE_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7