PSQt/include/WdgSpecHist.h

Go to the documentation of this file.
00001 #ifndef PSQT_WDGSPECHIST_H
00002 #define PSQT_WDGSPECHIST_H
00003 
00004 #include "ndarray/ndarray.h"
00005 #include <stdint.h> // uint8_t, uint32_t, etc.
00006 
00007 #include <PSQt/GUAxes.h>
00008 #include <PSQt/WdgColorBar.h>
00009 
00010 #include <QWidget>
00011 
00012 //#include <Qt>
00013 #include <QtGui>
00014 #include <QtCore>
00015 
00016 
00017 namespace PSQt {
00018 
00019 /// @addtogroup PSQt PSQt
00020 
00021 /**
00022  *  @ingroup PSQt
00023  * 
00024  *  @brief Widget to display spectral historgam for image.
00025  * 
00026  *  @code
00027  *  public slots:
00028  *    void onSHistIsFilled(float*, const float&, const float&, const unsigned&);
00029  *  @endcode
00030  * 
00031  *  Constructor creates a widget with default frame of axes.
00032  *  Actual axes scale and histogram show up through the call to slot onSHistIsFilled(...).
00033  *
00034  *  This software was developed for the LCLS project.  If you use all or 
00035  *  part of it, please give an appropriate acknowledgment.
00036  *
00037  *  @see GUView
00038  *
00039  *  @version $Id: WdgSpecHist.h 9841 2015-03-26 18:35:44Z dubrovin@SLAC.STANFORD.EDU $
00040  *
00041  *  @author Mikhail Dubrovin
00042  */
00043 
00044 class WdgSpecHist : public QWidget
00045 {
00046  Q_OBJECT // macro is needed for connection of signals and slots
00047 
00048   public:
00049     WdgSpecHist(QWidget *parent = 0); 
00050     virtual ~WdgSpecHist();
00051 
00052     PSQt::WdgColorBar* colorBar() { return m_cbar; };
00053     PSQt::GUAxes* axes() { return m_axes; };
00054 
00055   public slots:
00056   /**
00057    *  @brief Public slot for histogram update. 
00058    *  
00059    *  @param[in] - float* - pointer to the histogram array
00060    *  @param[in] - const float& - low limit for histogram range
00061    *  @param[in] - const float& - upper limit for histogram range
00062    *  @param[in] - const unsigned& - number of bins
00063    */ 
00064     void onSHistIsFilled(float*, const float&, const float&, const unsigned&);
00065 
00066   private:
00067     inline const char* _name_(){return "WdgSpecHist";}
00068 
00069     QHBoxLayout* m_hbox;
00070     QVBoxLayout* m_vbox;
00071     PSQt::GUAxes* m_axes;
00072     PSQt::WdgColorBar* m_cbar;
00073     QGraphicsPathItem* m_path_item;
00074 };
00075 
00076 } // namespace PSQt
00077 
00078 #endif // PSQT_WDGSPECHIST_H

Generated on 19 Dec 2016 for PSANAmodules by  doxygen 1.4.7